Hi,
On 2/8/07, andy1983 <[EMAIL PROTECTED]> wrote:
>
>
> That was a neat trick. However, it created a new problem.
>
> Before, it took way too long for a 10,000 columns to finish.
>
> Now, I test the memory limit. With 10,000 columns, I use up about 1.5 GBs.
>
> Assuming memory is not the issue, I still end up with a huge matrix that
> is
> difficult to export. Is there a way to convert it to 3 columns (1 for row,
> 1
> for column, 1 for value)?
>
> Thanks.
Since I had recently a similar question, I hope the following code helps
you:
mymatrix <- matrix(runif(80), ncol=8)
rownames(mymatrix) <- paste("yvar",1:nrow(mymatrix), sep="")
colnames(mymatrix) <- paste("xvar",1:ncol(mymatrix), sep="")
only.three.columns <- as.data.frame.table(mymatrix)
Does it do what you want?
Best,
Roland
[[alternative HTML version deleted]]
______________________________________________
[email protected] mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.