[英]Generate path string of subfolder in the working directory for R
In R, I want to load a file in a subfolder in working directory. 在R中,我想在工作目录的子文件夹中加载文件。 But For convinent, I want to generate path of this folder to combine with file which i want to access.
但是为了方便起见,我想生成此文件夹的路径以与我要访问的文件结合。 I don't know how to do it.
我不知道该怎么做。
Please help me. 请帮我。
Thank a lot. 非常感谢。
Use file.path
使用
file.path
> file.path(getwd(), "yourpath")
[1] "C:/Users/john/Documents/yourpath"
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.