View source: R/fcts packages.R
mosaic_network | R Documentation |
Use output of loop or interpolation and combine all individuals (mosaic) together using the mean or max values.
mosaic_network(ls, index = 2, sc = T, fun = mean)
ls |
An object produced by the loop or interpolate functions |
index |
Index indicating which layer to take in the stack |
sc |
Whether to scale all individual rasters (default = TRUE) |
fun |
Whether mean or max should be used as the mosaic function (default = mean) |
A raster layer object.
data(puechabonsp)
locs <- puechabonsp$relocs
xy <- coordinates(locs)
df <- as.data.frame(locs)
da <- as.character(df$Date)
da <- as.POSIXct(strptime(as.character(df$Date),"%y%m%d", tz="Europe/Paris"))
litr <- as.ltraj(xy, da, id = id)
out1<-loop(litr)
mean_weight<-mosaic_network(out1, index=2, sc=T, fun=mean) #Perform mean weight (not-interpolated)
plot(mean_weight)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.