I'm trying to loop in a list of dataframes (almost 30 df) and print the file address with the name of the dataframe. For example:
q <- list(ASE, FES, GAN, PEC)
t <- "C:/ME/Plots/"
for (i in q){
print(paste0(t,quote(i), ".png",sep=" "))
}
Another possible solution:
for (i in q){
print(paste0(t, deparse(substitute(i)), ".png"))
}
However, both gives me this result:
[1] "C:/ME/Plots/i.png "
[1] "C:/ME/Plots/i.png "
[1] "C:/ME/Plots/i.png "
[1] "C:/ME/Plots/i.png "
The expected output is this:
[1] "C:/ME/Plots/ASE.png "
[1] "C:/ME/Plots/FES.png "
[1] "C:/ME/Plots/GAN.png "
[1] "C:/ME/Plots/PEC.png "