Description Usage Arguments Value Author(s) Examples
View source: R/occ.desaggregation.RASTER.R
The function removes duplicated points falling into the same raster cell.
1 | occ.desaggregation.RASTER(df, colxy, rast, plot = T)
|
df |
a matrix or data.frame containing the points coordinates |
colxy |
a numeric vector indicating the IDs of the x-y columns |
rast |
a |
plot |
a logical vector indicating if a plot must be displayed |
a matrix including the reduced points
Mirko Di Febbraro
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 | ## Not run:
library(raster)
raster(system.file("exdata/prediction_ground.gri", package="DeepTime"))->prediction_ground
data(lgm)
data_mammuth<-subset(lgm, spec=="Mammuthus_primigenius")
coordinates(data_mammuth)<-~x+y
proj4string(data_mammuth)<-"+proj=longlat +ellps=WGS84 +datum=WGS84 +no_defs"
data_mammuth<-spTransform(data_mammuth, proj4string(prediction_ground))
data_mammuth<-as.data.frame(data_mammuth)
data_mammuth_reduced<-occ.desaggregation.RASTER(df=data_mammuth, colxy=4:5,
rast=prediction_ground, plot=T)
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.