Re: [R] iterative read - write

2018-04-17 Thread Thierry Onkelinx
Dear Bruce, I'd write a function that take filenames as arguments. It should read the file, do the calculations and write that output to another file which can be calculated from the input. You can get all input files in a directory with e.g. list.files(). Then you can simply loop over the

Re: [R] iterative read - write

2018-04-17 Thread Bert Gunter
Suggestions? Yes. Don't do this. Instead, wrap your code in a function, use lapply() to apply it over your list of files, returning all results in one list, and then save the list in an .rdata file. Also, in future, please post in plain text, as html tends to get mangled on this plain text list

[R] iterative read - write

2018-04-17 Thread Neotropical bat risk assessments
Hi all, I would like to set up an iterative read & write sequence to avoid reading and writing each file one at a time. Hundreds of data sets to re-calculate.  The code I have works well individually, but would like to set up an iterative read, calculate and write changing the input and output