Hello,
When you work on RStudio, you should notify which directory are you using.
Because, the output files will be created on working directory.
Here is the method of default setting of working directory.
1. Run the RStudio and you can see the below picture.
Here you can set working directory by default.
![](https://blog.kakaocdn.net/dn/b5OAhC/btrQw3zFTx9/BH2tqlQo3mQrFiwjiiSky0/img.png)
2. Open the Global Option and fill in directory in
R sessions where you want to get output files.
Strong point of this method is you can open Rscript directly from here.
![](https://blog.kakaocdn.net/dn/cpWmeI/btrQvZYs9sI/tMyvC6wubYKzgXYOZ2bfnK/img.png)
3. Working Directory setting by command
getwd() #현재 내가 어디서 작업을 하고 있는지 알려주는 명령어
setwd("C:/usr/path/to/what/you/want/") #path to what you want 라는 하위 또 그 하위 폴더가 작업공간
getwd() #한 번 더 입력함으로써 작업 공간이 바뀌었는지 확인
The end of Rstudio Working Directory Default setting!
'R > R_Usage [Eng.]' 카테고리의 다른 글
Heatmap visualization in Rstudio _ high resoultion figure (0) | 2022.11.08 |
---|---|
ANOSIM, Statistical analysis with Rstudio (0) | 2022.11.07 |
Microbiome beta-diversity 3D plot in R (mds, pcoa) (0) | 2022.11.03 |
Meaning of "header =" in R and colnames default setting (0) | 2022.11.03 |
Computer Task Automation with R program. "KeyboardSimulator" (0) | 2022.11.02 |