mosaic_network: Mosaic (combine) individual raster together for a given...

View source: R/fcts packages.R

mosaic_networkR Documentation

Mosaic (combine) individual raster together for a given variable

Description

Use output of loop or interpolation and combine all individuals (mosaic) together using the mean or max values.

Usage

mosaic_network(ls, index = 2, sc = T, fun = mean)

Arguments

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)

Value

A raster layer object.

Examples

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)

BastilleRousseau/moveNT documentation built on Aug. 26, 2023, 5:54 a.m.