Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
7 years ago
Solved

how to set the working directory in R

Hello,

 

I would like to set my working directory to a directory located on a server.  The address look like this one:

\\corporative\data\....\test

 

I have tried the following script

work_dir <-"\\corporative\data\....\test"

setwd(work_dir)

 

I receive this error: 

 

 

  • Hi Anonymous ,

    From the document, it says that when setting the working directory within the R script, you must define a full path to the working directory, rather than a relative path.

    Please check if your path is correct.

    Best  Regards,

    Cherry

1 Reply

  • v-piga-msft's avatar
    v-piga-msft
    Resident Rockstar

    Hi Anonymous ,

    From the document, it says that when setting the working directory within the R script, you must define a full path to the working directory, rather than a relative path.

    Please check if your path is correct.

    Best  Regards,

    Cherry