r - 循环 df 列表并打印文件地址
问题描述
我正在尝试循环输入数据框列表(几乎 30 df)并使用数据框的名称打印文件地址。例如:
q <- list(ASE, FES, GAN, PEC)
t <- "C:/ME/Plots/"
for (i in q){
print(paste0(t,quote(i), ".png",sep=" "))
}
另一种可能的解决方案:
for (i in q){
print(paste0(t, deparse(substitute(i)), ".png"))
}
但是,两者都给了我这个结果:
[1] "C:/ME/Plots/i.png "
[1] "C:/ME/Plots/i.png "
[1] "C:/ME/Plots/i.png "
[1] "C:/ME/Plots/i.png "
预期的输出是这样的:
[1] "C:/ME/Plots/ASE.png "
[1] "C:/ME/Plots/FES.png "
[1] "C:/ME/Plots/GAN.png "
[1] "C:/ME/Plots/PEC.png "
解决方案
推荐阅读
- php - 在php中加密并在sql server中解密
- python - PyCharm Python - 在调试器中显示对象的 __str__ 而不是内存地址
- javascript - 将对象推送到不适用于 Javascript 反应的数组
- javascript - 使用 Javascript 保存 HTML 文件的方法
- excel - VBA重复将2张不同组合从一个主工作簿复制到新工作簿?
- android - 如何将 Android SingleLaunchActivityTestCase 转换为 ActivityTestRule?(仪器单元测试)
- c# - 从数据表中更新有界数据网格视图中的插入数据
- spring-boot - PCF 无法在应用程序中同时使用配置服务器和服务注册表
- javascript - Facebook edge.create 从 api 中删除的解决方法
- database - Neo4j 在匹配查询中多次应用关系