get_drinking_event: Get drinking events from movement data

Description Usage Arguments Examples

Description

get_drinking_event assumes that when animals cross a certain threshold of distance to water they go drinking. It identifies unique drinking events given a certain return time above which it is considered as a new visit. Distance to water might be provided as a SpatialPointsDataFrame or as two columns (named dist2water & waterholes) in the dataframe df.

Usage

1
2
get_drinking_event(df, water_layer = NULL, threshold = 500,
  returnTime = 6, projstring, id = F)

Arguments

df

a dataframe with at least coordinates df$x, df$y and date and time in df$dateTime in POSIXct class.

water_layer

a SpatialPointsDataFrame of waterhole with column $name in data slot. If NULL, function assumes that column df$dist2water gives distance to water

threshold

distance below which animals are considering going to drink

returnTime

return time (in hours) above which an animals can be considering returning drinking to the former waterhole

projstring

CRS projection of data

id

if TRUE calculate distance for individuals identified by column df$id

Examples

1
get_drinking_event(df,water_layer=NULL,threshold=500,return=6,origin_julday,projstring)

rpatin/drinking documentation built on May 28, 2019, 12:36 a.m.