r - produce multiple time series in different plot and save in working directory -
this appears quite simple have no idea how go it. dataframe looks this:
var1 var2 var3 var4 var5 var6 ..... var57 1 23 67 89 63 34 ..... 90 2 34 43 43 23 23 ..... 32 3 45 65 45 32 54 ..... 43 4 45 32 18 61 87 ..... 39 5 23 74 53 54 76 ..... 54 6 21 65 34 34 12 ..... 97 . . . . . . ..... . . . . . . . ..... . . . . . . . ..... . 365 54 78 54 12 90 ..... 53
i want produce separate plots , save them in working directory var1 against variables.
plot(var1 ~ var2) plot(var1 ~ var3) plot(var1 ~ var4) plot(var1 ~ var5) . . . . . plot(var1 ~ var57)
is there way automate dont have produce each individual plots @ time , save in working directory?
thanks lot.
pdf("plots.pdf") for(i in 2:ncol(df)) plot(df[,1] ~ df[,i]) dev.off()
Comments
Post a Comment