Stacking an existing RasterStack multiple times

久未见 提交于 2019-11-29 04:56:33

You might like mget here, since it takes a character vector of object names and returns the object, so you can do this:

big.stack <- stack( mget( rep( "s" , 12 ) ) )

nlayers( big.stack )
#[1] 144

Or using replicate() to put them in a list if you don't like using mget(), and then stacking the list as a list of rasterLayers is valid input to stack()...

ll <- replicate( 12 , s )

big.stack2 <- stack( ll )

identical( big.stack , big.stack2 )
#[1] TRUE
标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!