简体   繁体   English

如何在R中写入唯一的CSV文件名

[英]How to write unique CSV file names in R

I conducted 12 different experiments and I want to apply a script to each csv file in the folder. 我进行了12个不同的实验,我想将脚本应用于文件夹中的每个csv文件。 The csv files in the folder have names like emo_1, emo_2. 文件夹中的csv文件的名称类似emo_1,emo_2。 etcetera 等等

After conducting analysis, joining with other files of type route_1, route_2...etc 进行分析后,与其他类型为route_1,route_2 ... etc的文件合并

I wish to write.csv and assign unique names, so I get unique files in my directory of type emoroute_1, emoroute_2 我希望写入.csv并分配唯一的名称,因此我在emoroute_1,emoroute_2类型的目录中获得了唯一的文件

Thanks for your suggestions! 感谢您的建议!

如果您有样本1到n ,请执行以下操作:

fileNames <- paste0("emoroute_", 1:n)

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM