Hi,

I have a function PICTURE() and do something like

        COUNTRY = 'Namibia'
        NAKURVE = PICTURE(COUNTRY)
        NAKURVE
        ggsave(paste0(tolower(COUNTRY),".png"), width = 16, height = 9)

        COUNTRY = ('Germany')
        DEKURVE = PICTURE(COUNTRY)
        DEKURVE
        ggsave(paste0(tolower(COUNTRY),".png"), width = 16, height = 9)

        COUNTRY = ('Netherlands')
        NLKURVE = PICTURE(COUNTRY)
        NLKURVE
        ggsave(paste0(tolower(COUNTRY),".png"), width = 16, height = 9)

[...]

        COUNTRYGRID=grid.arrange(NAKURVE, DEKURVE, NLKURVE,
                                 ncol=3)
        COUNTRYGRID
        ggsave(paste0("R7.incidence.", Sys.Date(), ".png"), COUNTRYGRID)

I am not able to figure out (and/or find on Google) how to do this in a
loop (of sorts), ie create the variables dynamically and add them to to
the grid (dynamically, ie adding more countries)

Any ideas?

greetings, el
--
To email me replace 'nospam' with 'el'

______________________________________________
R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.

Reply via email to