I wanna save a list of scatterplots with their filenames. Therefor I give each plot a name, which worked perfectly:
names(scatterplot_standardcurve) <-
sub("\\.xlsx$",
".png",
names(standardcurve_concentration))
> print(scatterplot_standardcurve)
$K_20210722
$A_20210722
$c_20210722
$d_20210722
$t_20210722
$v_20210722
And then I want to save them in a specific folder but I always get an error
lapply(names(scatterplot_standardcurve),
function(nm) print(scatterplot_standardcurve[[nm]]) +
ggsave(filename = file.path("Z:/output/scatterplot_standardcurve/",
nm )))
Error: Unknown graphics device ''