[R] array writing and their filenames
Roland Rau
roland.rproject at gmail.com
Mon Jul 30 21:52:49 CEST 2007
Dong GUO 郭东 wrote:
> Hi,
>
> I want to save a array (say, array[6,7,8]) write a cvs file. How can I do
> that??? can I write in one file?
For array[6,7,8], you don't need a csv(!) file since it is only a
scalar. If this is what you want, check
?write.table
But what you probably meant is how to write a three-dimensional array to
disk. Have a look at this code:
##########
roland <- array(1:(6*7*8), dim=c(6,7,8))
roland
dump(list="roland", file = "H:\\dumpdata.R")
ls()
rm(list=ls())
ls()
source("H:\\dumpdata.R")
ls()
roland
##########
Does this help?
Roland
More information about the R-help
mailing list