Karl, You can use the crop function for that. Define the extent that you
want, and use that for all rasters. Robert

On Mon, Aug 13, 2012 at 12:12 PM, Karl Jarvis <karljarvis@gmail.com> wrote:

> Hi all,
> I'd like to trim a large number of simulated rasters with no coordinate
> system to the same extent.  The rasters all have some NAs on their margins,
> but not the entire margins, so I can't just use trim() in package raster.
>  What would be an efficient approach to removing rows or columns of rasters
> that contain NAs?
>
> An example raster, where I would want to remove the entire first row:
> r <- raster()
> values(r) <- 1
> values(r)[1:300] <- NA
>
> Thanks!
> Karl
>         [[alternative HTML version deleted]]
>
> _______________________________________________
> R-sig-Geo mailing list
> R-sig-Geo@r-project.org
> https://stat.ethz.ch/mailman/listinfo/r-sig-geo
>

	[[alternative HTML version deleted]]

