Johannes,

On Tue, Mar 6, 2012 at 5:45 AM, Johannes Radinger <JRadinger@gmx.at> wrote:

> Hi,
>
> I have several environmental rasters (loaded as stack/brick) in R which I
> want to use as predictors for Species Distribution Models (preferably
> Maxent) with the dismo-package. Some of the predictors are habitat specific
> variables and are restricted to a river (like a line of raster cells, all
> land is NA) while others cover the total spatial extent (climatic
> variables). Thus I've also created a raster MASK which indicates the cells
> that have values (that are non-NAs) in ALL maps.
>
> Now I've two questions:
> 1) How can I use such a MASK within e.g. maxent to restrict my background
> points and predictions etc. only to these cells?
>

That is automatic. All cells with NA values are removed. However,
background sampling might suffer in this case, and it could be good to make
your own background sample using the "randomPoints" function (that takes a
mask layer as argument).



> 2) How can I simply exclude presence points that are outside these masking
> raster cells? I want only those samples (presences of my species) that are
> sampled within my defined rivers.
>
>
That is automatic, only points with values for all layers are maintained.
If you are not sure, you can of course also extract the values for the
points and remove all rows with NAs. Please see the help files and the
vignette!

Robert



> Thank you,
>
> Johannes
> --
>
> Jetzt informieren: http://mobile.1und1.de/?ac=OM.PW.PW003K20328T7073a
>
> _______________________________________________
> R-sig-Geo mailing list
> R-sig-Geo@r-project.org
> https://stat.ethz.ch/mailman/listinfo/r-sig-geo
>

	[[alternative HTML version deleted]]

