jeudi 4 octobre 2018

How to create 10 random rasters in R?

I am looking to generate several random raster in a loop that I plan to store. I tried something (below) that but it does not work:

a<- 10
for (i in 1:length(a)){
values(r1[i]) = round(runif(ncell(r1[i]), 0, 1))}

Thanks for any help.




Aucun commentaire:

Enregistrer un commentaire