1
我想從excel打開數據並將它們加載到矩陣,但是當我這樣做時,我看不到值,但只看到「數字」一詞。從excel表讀取矩陣後不顯示數據
控制檯輸出:
> c<-readWorksheetFromFile("test.xlsx", sheet = 1, header = FALSE)
> c
Col1 Col2
1 3.0 4.0
2 5.0 6.0
3 7.0 8.0
4 8.0 9.0
5 10.0 11.0
6 11.7 12.7
7 13.4 14.4
> matrix(c,7,2)
[,1] [,2]
[1,] Numeric,7 Numeric,7
[2,] Numeric,7 Numeric,7
[3,] Numeric,7 Numeric,7
[4,] Numeric,7 Numeric,7
[5,] Numeric,7 Numeric,7
[6,] Numeric,7 Numeric,7
[7,] Numeric,7 Numeric,7