1, create a vector:
1) create create a vector, c is create i.e., 2) create a vector that is created 3) using vector such as functions and attached: string to single quotes, single quotes if the string itself, the need to add double quotes surround the string with single quotesg=c(1,10)
:
a=1:10
B=LETTERS[1:10]
a=seq(1,10)
> g=c(1,10) #使用create创建向量
> g
[1] 1 10
> str(g) # 查看对象g的结构
num [1:2] 1 10
> a=seq(1,10) #使用函数创建向量
> a
[1] 1 2 3 4 5 6 7 8 9 10
> a=1:10 #使用:创建向量
> a
[1] 1 2 3 4 5 6 7 8 9 10
> B=LETTERS[1:10] #使用函数创建向量
> B
[1] "A" "B" "C" "D" "E" "F" "G" "H" "I" "J"
2, dim
Garvey degree: dim(f)=c(2,5)
# created two lines of dimension five
results: