Re: [R] create distinct variable names

2022-05-14 Thread Rui Barradas
Hello, Replace the for loop by a lapply loop and assign the names after, with sprintf("Corr%d", 1:10) Is out a data.frame? Can you post dput(head(out))? Hope this helps, Rui Barradas Às 18:33 de 14/05/2022, Sorkin, John escreveu: I am trying to create distinct variable names of the form Co

Re: [R] need to plot multiple spatial maps side-by-side in a single window using sf plot function in R

2022-05-14 Thread Bert Gunter
It seems that sp uses the lattice package and spplot() for multiple plots. These are completely incompatible with base plot's par(mfrow =...) multiple plotting. I think you need to study how lattice works. In particular, see ?plot.trellis and ?xyplot for some relevant info. You might also do bette

[R] need to plot multiple spatial maps side-by-side in a single window using sf plot function in R

2022-05-14 Thread Ranjeet Kumar Jha
Hi, I like to plot all my 5 spatial maps of drought indices in a single window using the sf plot function in R. I am able to plot all maps separately but unable to plot altogether. All indexes are showing drought indices. I really appreciate your help! Here is the code: #merging using merge fun