R Programming tutorial - How to set working directory in R (Mac) - Programming in R

preview_player
Показать описание
This video demonstrated how to check the current working directory path using the R menu options under Misc as well as by using getwd() function. Also, demonstrates how to change or set the working directory using menu option and setwd() function.

R working directory is location (a folder) in your system where R would save the R output files as well as load the files from.

It is always good to have separate working directories for the projects you work on. That way the project related files would be separate from each other. Also, R would know where to load files from, as by default, R loads the files from working directory. We need to just change the working directory depending on the project we are working.

Best viewed in full screen mode.
Рекомендации по теме
Комментарии
Автор

Thank you! This helped using Rstudio as well!

melissasteinman
Автор

hey bro thanks for the video, it helped me a lot. However I found that after i set my working directory for R and close R and reopen and check where the working directory is with getwd(), it resets to what it previously was showing ("/"). Do you know if i can find a way around that?

pragashgnana
Автор

Hi Abhinav,
I am working on R studio Cloud, and haven't been able to set a working directory on my system. I can only create a folder on the cloud. I want to understand why is this the case?

umangaggarwal
Автор

Man can you help me please? I don't know how to open a script. I go to ''process scripts or load data into r'' but then I get error: cannot change working directory. What should I do?

killcamShotZz