Re: [R] Writing multiple matrices

2008-12-11 Thread Jorge Ivan Velez
Dear Carlos, Try this: # Working directory setwd("C:/") # Generating 10 files sapply(1:10, function(x){ # Create X X= matrix(rnorm(100),ncol=10) # Write X write.table(X, paste('my_matrix_',x,'.dat',sep=""), quote=FALSE,sep='\t',col.names=FALSE,row.name

[R] Writing multiple matrices

2008-12-11 Thread Carlos López
Hello all :) I have a for loop where in each cycle I create certain matrix object, let´s say, X, I would like to write it so I use the write.table function but I would like to write as many matrices as cycles, this is, I would like to use a variable, let´s say y, that will be in the for, as in: