[R] artificial data matrix with 100000 rows
Paul Smith
phhs80 at gmail.com
Sun Sep 9 13:17:32 CEST 2007
On 9/9/07, kevinchang <shukai at seas.upenn.edu> wrote:
> I tried to made the matrix with this size by either matrix() or array().
> However, there seems to be default limit of number for rows made. I got sort
> of error message from R .To be specific,
>
> m<--matrix(ncol=3,nrow=100000)
>
> error message:[ reached getOption("max.print") -- omitted 66667 rows ]]
>
> or
>
> a<-array(dim=c(10000,3,10))
>
> error message:reached getOption("max.print") -- omitted 6667 row(s) and 6
> matrix slice(s) ]
That is not an error message, I guess. When the matrices are huge, R
is unable to print them totally on the screen, but all data are
present. For instance,
> m[(nrow(m)-10):nrow(m),]
[,1] [,2] [,3]
[1,] NA NA NA
[2,] NA NA NA
[3,] NA NA NA
[4,] NA NA NA
[5,] NA NA NA
[6,] NA NA NA
[7,] NA NA NA
[8,] NA NA NA
[9,] NA NA NA
[10,] NA NA NA
[11,] NA NA NA
>
See
?getOption
Paul
More information about the R-help
mailing list