В Fri, 23 Aug 2024 10:15:55 +0200
<sibylle.stoec...@gmx.ch> пишет:

> > s<-sf$Unterregio
> > r<-allrasters_pres[[1]]
> > 
> > 
> > rs <- stack(r, s)
> > names(rs) <- c('r', 's')  
> Error in `names<-`(`*tmp*`, value = c("r", "s")) : 
>   incorrect number of layer names

It looks like at least one of the rasters 'r' and 's' has multiple
layers. What does names(rs) return? I would offer more detailed advice,
but I don't know 'raster' that well.

The "R Inferno" book [1] offers a lot of generic-R troubleshooting
advice, which should help you progress past errors like this one
without waiting for someone on R-help to reply.

-- 
Best regards,
Ivan

[1] https://www.burns-stat.com/documents/books/the-r-inferno/

______________________________________________
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 https://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.

Reply via email to