I have an array Y_obs
of dimension (200X353x5) which came as an output in R (I mostly use Rstudio in Ubuntu 13.10.).
我有一个维度的数组Y_obs(200X353x5)作为R的输出(我主要在Ubuntu 13.10中使用Rstudio)。
The problem: print(Y_obs)
does not display the whole array in console. It is showing the following:
问题:print(Y_obs)不会在控制台中显示整个数组。它显示以下内容:
[22,] 0 0 0 0 0 0
[23,] 0 0 0 0 0 0
[24,] 0 0 0 0 0 0
[25,] 0 0 0 0 0 0
[26,] 0 0 0 0 0 0
[27,] 0 0 0 0 0 0
[28,] 0 0 0 0 0 0
[ reached getOption("max.print") -- omitted 172 row(s) and 4 matrix slice(s) ]
Then I went to sink my array Y_obs
by using the following commands:
然后我使用以下命令接收我的数组Y_obs:
sink('CR.csv')
Y_obs
sink()
Then also it is showing the same output as the console after saving the incomplete data in the .csv file omitting the last 172 rows and 4 matrix slices.
然后,在.csv文件中保存不完整数据,省略最后172行和4个矩阵切片后,它也显示与控制台相同的输出。
When I tried the same in R terminal the it showed:
当我在R终端尝试相同时,它显示:
[81,] 0 0 0 0 0 0
[82,] 0 0 0 0 0 0
[83,] 0 0 0 0 0 0
[ reached getOption("max.print") -- omitted 117 row(s) and 3 matrix slice(s) ]
My question is: How to save the full array Y_obs
in a specified .csv file ?
我的问题是:如何在指定的.csv文件中保存完整的数组Y_obs?
1 个解决方案
#1
1
?options # the help page for the options function should appear.
bigger = options()$max.print + 200 # or add something larger
options("max.print" = bigger) # apparently RStudio sets max.print very low.
print(Y_obs) # the default on the typical R installation is around 10K
#1
1
?options # the help page for the options function should appear.
bigger = options()$max.print + 200 # or add something larger
options("max.print" = bigger) # apparently RStudio sets max.print very low.
print(Y_obs) # the default on the typical R installation is around 10K