【发布时间】:2012-07-20 11:20:20
【问题描述】:
有一个data.frame
> x
date open high low close volume adjusted
1 2010-01-04 24.52 24.58 23.68 23.71 24192200 23.71
2 2010-01-05 23.75 23.90 22.75 23.30 55649900 23.30
3 2010-01-06 23.25 23.25 22.72 22.90 41214300 22.90
4 2010-01-07 22.90 23.05 22.40 22.65 35533600 22.65
5 2010-01-08 22.50 22.75 22.35 22.60 28854300 22.60
6 2010-01-11 23.50 23.68 22.28 22.60 44284600 22.60
> is.vector(x[,1])
[1] FALSE
> is.vector(x[,2])
[1] TRUE
> is.vector(x[,1])
[1] FALSE
> is.vector(x[,3])
[1] TRUE
> is.vector(x[,4])
[1] TRUE
> is.vector(x[,5])
[1] TRUE
> is.vector(x[,6])
[1] TRUE
> is.vector(x[,7])
[1] TRUE
我想知道为什么is.vector(x[,1]) 不是 TRUE?
【问题讨论】:
-
发布问题时请遵循以下准则:stackoverflow.com/questions/5963269/…
-
也许“The R Inferno”的第 29-30 页会回答您的问题。 burns-stat.com/pages/Tutor/R_inferno.pdf
标签: r