Re: [R] How to automatically set R to read the files from a specific location

2022-03-02 Thread Avi Gross via R-help
Just a silly  thought, Paul. If this is really for a class and the file(s) being used are small enough, you can play a game where the data is already in the R program and is simply written into a file at the start in the current directory or a designated area. If that succeeds, you can then ha

Re: [R] How to automatically set R to read the files from a specific location

2022-03-02 Thread Jeff Newmiller
1) make a working directory. Put all related files (including your R file(s) in that directory or in subdirectories. 2) Set your working directory as "current" before starting R. If you or anyone who wants to use your code does this, no actions will be needed in the script to "change" the direct

[R] How to automatically set R to read the files from a specific location

2022-03-02 Thread Paul Bernal
Dear friends, I am working on an assignment using R, and I would like to set my R code so that R automatically recognizes where the files that need to be read are without having to use the absolute path? The idea is that when I send my .R script and my professor receives it, he can just execute th