Scripting a repeating work flow

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

Scripting a repeating work flow

Rich Shepard
   I have 30 data files that all need to be read into R, formatted, and have
scatter plots prepared. This process can be done in a short script. I would
like to generalize the script so that variables (such as data file names)
can be read from another file and all files processed sequentially, similar
to a bash shell script repeating commands for all files in a directory.

   Looking at my R programming books I don't find a way to do this and would
appreciate pointers to multi-file script writing that can be run within R
using the source() function.

Rich

______________________________________________
[hidden email] mailing list -- To UNSUBSCRIBE and more, see
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.
Reply | Threaded
Open this post in threaded view
|

Re: Scripting a repeating work flow

David Winsemius

> On Jul 19, 2018, at 3:04 PM, Rich Shepard <[hidden email]> wrote:
>
>  I have 30 data files that all need to be read into R, formatted, and have
> scatter plots prepared. This process can be done in a short script. I would
> like to generalize the script so that variables (such as data file names)
> can be read from another file and all files processed sequentially, similar
> to a bash shell script repeating commands for all files in a directory.
>
>  Looking at my R programming books I don't find a way to do this and would
> appreciate pointers to multi-file script writing that can be run within R
> using the source() function.

https://markmail.org/search/?q=list%3Aorg.r-project.r-help+script+process+multiple+csv+files

https://stackoverflow.com/questions/11433432/importing-multiple-csv-files-into-r

https://www.google.com/search?q=use+r+to+process+multiple+csv+files&oq=use+r+to+process+multiple+csv+files

>
> Rich
>
> ______________________________________________
> [hidden email] mailing list -- To UNSUBSCRIBE and more, see
> 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.

David Winsemius
Alameda, CA, USA

'Any technology distinguishable from magic is insufficiently advanced.'   -Gehm's Corollary to Clarke's Third Law

______________________________________________
[hidden email] mailing list -- To UNSUBSCRIBE and more, see
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.
Reply | Threaded
Open this post in threaded view
|

Re: Scripting a repeating work flow

Rich Shepard
On Thu, 19 Jul 2018, David Winsemius wrote:

> https://markmail.org/search/?q=list%3Aorg.r-project.r-help+script+process+multiple+csv+files
> https://stackoverflow.com/questions/11433432/importing-multiple-csv-files-into-r
> https://www.google.com/search?q=use+r+to+process+multiple+csv+files&oq=use+r+to+process+multiple+csv+files

   Thanks, David. My search terms missed these.

Best regards,

Rich

______________________________________________
[hidden email] mailing list -- To UNSUBSCRIBE and more, see
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.