How to find or set the working directory in R

Sometimes it is necessary to find or set a working directory in R, even if you don’t necessarily want to. For example, if you are saving an R plot and do not understand where the result goes, it is necessary to look for that. You can do working directory detection or setup using the base… Continue reading How to find or set the working directory in R

Get file location in R

Here are multiple scenarios on how to get file location in R. It can be a directory or a full path, and sometimes there are specific file types that you want to detect. A typical use case is when combining data from multiple files, for example, rds files or other formats.

Get full path to current R script

Are you wondering where is my current R script file located and how to determine the full path? Here is how to do that in RStudio or while running in batch mode.

Exit mobile version