Re: [R] save and load in R

2011-06-20 Thread Ivan Calandra
Hi, Check also saveObject() and loadObject() from R.utils: library(R.utils) outfilenames- paste (./file, 1:numFiles, '.Rbin', sep=) for ( i in 1:10) { dataFile = read.table (filenames[i], header=TRUE, sep='\t'); saveObject (dataFile, file = outfilenames[i]) } And then: file1 = loadObject

[R] save and load in R

2011-06-19 Thread Mary Kindall
I have a list of txt files that I want to convert into .rdata R data object. filenames 1. ./file1.txt 2. ./file2.txt 3. ./file3.txt 4. ./file4.txt 5. ./file5.txt 6. ./file6.txt 7. ./file7.txt 8. ./file8.txt 9. ./file9.txt 10. ./file10.txt I saved these files as for ( i in 1:10) { dataFile =

Re: [R] save and load in R

2011-06-19 Thread Duncan Murdoch
On 11-06-19 10:26 AM, Mary Kindall wrote: I have a list of txt files that I want to convert into .rdata R data object. filenames 1. ./file1.txt 2. ./file2.txt 3. ./file3.txt 4. ./file4.txt 5. ./file5.txt 6. ./file6.txt 7. ./file7.txt 8. ./file8.txt 9. ./file9.txt 10. ./file10.txt I saved these

Re: [R] save and load in R

2011-06-19 Thread Mary Kindall
Thanks Jeff and Duncan Assign worked for me. I did not check the other methods suggested by you. I am repreducing my code below: ## filenames = list.files(path = ., pattern = '.txt$', all.files = FALSE, full.names = TRUE, ignore.case = FALSE) #all input files numFiles =