📜  在 - R 编程语言代码示例中创建向量

📅  最后修改于: 2022-03-11 14:52:00.857000             🧑  作者: Mango

代码示例1
#Use the c() function to store data in a vector. 
c(2.5, 48.5, 101.5)

#To create a vector of integers using the c() function, 
#you must place the letter "L" directly after each number.
c(1L, 5L, 15L)

#To create a vector containing characters aka strings 
c("Sara" , "Lisa" , "Anna")

#To create a vector containing logicals aka logicals
c(TRUE, FALSE, TRUE)