I am working on various codes put in a folder. I want to open the .r file and source it such that I do not have to change the working directory in Rstudio as shown below:
Is there any command to specify my working directory automatically in R.
You can try out this solution:
this.dir <- dirname(parent.frame(2)$ofile)
Put the above code somewhere in the file so that the working directory is changed according to that file.
cat("\n" ...READ MORE
To set global variables, you can use ...READ MORE
You can use the window explorer to ...READ MORE
Hey @Ali, its very simple one line ...READ MORE
You can use showWarnings = FALSE
NOTE: showWarnings ...READ MORE
Hope you are doing great.
You can ...READ MORE
We would start off by loading the ...READ MORE
You can use the "dplyr" package to ...READ MORE
You can use the reshape2 package for ...READ MORE
Requires the use of map_df to run each model, ...READ MORE