Hi,
I've read in the forum about creating a function in order to "map" plots.
For example, I wrote a basic code for plotting many graphs using a list of variables:
library(gapminder)
data_plots<-gapminder %>%
group_by(continent,year) %>%
summarise(vidas=mean(lifeExp))
variables<-list("year", "vidas")
gloop_simple<-map(
.x = variables,
.f = ~ggplot(data = data_plots) +
geom_col(aes(continent, y = .data[[.x]]))
)
gloop_simple[[1]]
gloop_simple[[2]]
Here I'm plotting the list of variables containing year and vidas, using always as axis x "continent".
The issue is I don't know how to send the list gloop_simple, containing the graphs, to the Environment.
I find info about a package named ggarrange, but It seems dead.
I hope you can guide me.
As always, thanks for your time and interest.