R get working directory: getwd()
R to set working directory:
From Windows, Rstudio session -> set working directory -> choose directory
Is the same as setwd()
Run R in Rstudio:
Ctrl + Enter and use mouse to highlight the chunk of code that you want to run.
Ctrl + shift + Enter run the whole file
没有在R里运行R文件这种东西。
你要在terminal里面运行。Rscript xxxxx.r
In R environment, this sentence is to echo everything in this R file, I used it in Rstudio
source(“trees_read_csv.r”, echo = TRUE)