until now i am stuck at looping and saving a ggplot from List i have looked at the another question but it did not working.
myplots=list()
par(mfrow = c(1, 5))
for (i in 1:5) {
#name=paste("ggp", i, sep = "_")
p1 =ggplot(Turbine[[i]],
aes(x=Turbine[[i]]$TS,
y=Turbine[[i]]$Pv..turbine))+
geom_point(size=1)+
ggtitle(names(Turbine[i])
)
print(i)
print(p1)
myplots[[i]]= p1
}
multiplot(plotlist=myplots,cols=5)
plot_grid(ggp_1,ggp_2,ggp_3,ggp_4,ggp_5) #trying to save ggplot as variable name
the problem i got is when i want to start plot of multiple plot in 1 drawing. i want to have 5 column of plots.
maybe s lapply func. is good?
let the data be
Turbine=list of listname
first listname= name(Turbine[1])
view(Turbine [[1]])
TS Pv..turbine
1 20
2 20
3 24
4 19
so