dput(x)
structure(c("2005-01-01: 1 ", "2005-01-02: 1 ", "2005-01-03: 1 ",
"2005-01-04: 1 ", "2005-01-05: 1 ", "2005-01-06: 1 ", "(Other) :724 ",
"Min. : 1.700 ", "1st Qu.: 3.062 ", "Median : 4.345 ",
"Mean : 6.267 ", "3rd Qu.: 7.435 ", "Max. : 22.100 ",
"NA's :666.000 ", "Min. : 0.2490 ", "1st Qu.: 0.6182 ",
"Median : 1.0500 ", "Mean : 2.2679 ", "3rd Qu.: 2.7825 ",
"Max. : 10.8000 ", "NA's :666.0000 ", "Min. :101 ",
"1st Qu.:101 ", "Median :101 ", "Mean :101 ", "3rd Qu.:101 ",
"Max. :101 ", NA), .Dim = c(7L, 4L), .Dimnames = list(c("",
"", "", "", "", "", ""), c("Dat", "Var1", "Var2", "Name")), class = "table")
我想看看這樣做的列:無法讀取彙總函數
x$Var1
,並收到此錯誤:
Error in x$Var1 : $ operator is invalid for atomic vectors
任何想法,我在做什麼是這裏錯了嗎?
可能的重複[爲什麼R不允許$運算符在原子向量?](http://stackoverflow.com/questions/9824268/why-doesnt-r-allow-operator-on-atomic-vectors) – Fraser
但它不是一個原子矢量。它似乎是「table」類的一個對象。 –
@MatthewLundberg,謝謝。但它仍然不適合我。我沒有x <-data.frame(x),也沒有運氣。 – user1471980