1
2
3
| paste("result.", 1:6, sep="")
# output
"result.1" "result.2" "result.3" "result.4" "result.5" "result.6" |
paste("result.", 1:6, sep="")
# output
"result.1" "result.2" "result.3" "result.4" "result.5" "result.6"
1
2
3
4
5
6
7
8
| for (n in 1:5){
file <- paste ("result_", n, ".pdf", sep="")
pdf(file)
......
dev.off()
}
# output
"result_1.pdf" "result_2.pdf" "result_3.pdf" "result_4.pdf" "result_5.pdf" |
for (n in 1:5){
file <- paste ("result_", n, ".pdf", sep="")
pdf(file)
......
dev.off()
}
# output
"result_1.pdf" "result_2.pdf" "result_3.pdf" "result_4.pdf" "result_5.pdf"
相关