file.path('folder1','folder2')
#[1] "folder1/folder2"
What did command above do within my working directory? The response: [1] "folder1/folder2"
is unclear
It doesn't do anything with your working directory; it makes the path and then you have to assign it to working directory:
> file.path('C:','Users')
[1] "C:/Users"
> getwd()
[1] "C:/Users/T/Documents"
> setwd(file.path('C:','Users'))
> getwd()
[1] "C:/Users"
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.