我正在尝试循环访问数据帧列表(近30 df),并使用数据帧的名称打印文件地址。例如:
q <- list(ASE, FES, GAN, PEC)
t <- "C:/ME/Plots/"
for (i in q){
print(paste0(t,quote(i), ".png",sep=" "))
}
Another可能的解决方案:
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 "