按老师输入的输入后出来的结果不一样,有错误
> y <- 1:4
> y
[1] 1 2 3 4
> names(y) <- c("a" "b" "c" "d")
错误: unexpected string constant in "names(y) <- c("a" "b""
> y
[1] 1 2 3 4
> y[2]
[1] 2
> names(y) <- ("a","b","c","d")
错误: 意外的',' in "names(y) <- ("a","
> y
[1] 1 2 3 4