如何在write.xlsx命令的file = string中包含值

时间:2016-10-12 16:51:25

标签: r

我正在努力寻找如何在语音标记内解决问题。在打击示例中,输出文件夹和write.xlsx行之间的其他代码逻辑加载。有什么建议吗?

client_name  <-"client a"
project_name <-"project x"
outputfolder <-"D:/client_abc_folder"

write.xlsx(df, file="outputfolder/client_name_project_name.xlsx", sheetName="my analysis", row.names = FALSE, append=TRUE)

1 个答案:

答案 0 :(得分:1)

使用paste0(outputfolder, "/", client_name, "_", project_name, ".xlsx")