acto_odba: Plot an actogram based on the ODBA

View source: R/acto_odba.R

acto_odbaR Documentation

Plot an actogram based on the ODBA

Description

Plots the overall activity of the focal animal based on the ODBA at every timestamp. The plot can center around midday or midnight.

Usage

acto_odba(data = ... , time = "..." , ODBA = "ODBA" , cutoff = 1 , night_shift = FALSE , sun = F , suncolor = "red" , timezone = "UTC" , long = ... , lat = ...)

Arguments

data

data frame containing timestamps and ODBA values

time

column name of the timestamp in " "

the date format needs to be in year-month-day hour-month-minute

ODBA

colum name of the ODBA values put in " "

by default this is "ODBA"

cutoff

set a percentile to cap the highest ODBA value

higher values will be lowered to the set percentile. The default is 1 were nothing is cutoff

night_shift

set to TRUE if the plot shall center around midnight

by default the plot centers around midday

sun

set to TRUE if sunset and sunrise lines shall be added to the plot

default is set to FALSE - see also details

suncolor

specify the color of the sunset/sunrise lines put in "..." (uses ggplot color codes)

default is red

timezone

specify the timezone in "..."

default is "UTC"

long

Longitude coordinate - needed for the calculation of the sunset/sunrise

lat

Latitude coordinate - needed for the calculation of the sunset/sunrise

Details

In cases where it is expected to see very high acceleration values du to the animal manipulating the tag directly, it could be considered to cut off the highest ODBA values by setting the cutoff value.

The sun times are calculated on a minute scale, so sunset or sunrise can happen at any minute. Often acceleration data is not recorded on a minute scale, therefore there might by sun times with no coresponding acceleration data timestamp. This would however distort the whole graph. To solve this the sun times are matched to the closest acceleration timestamp. How much the sun time is changed by this depends on how often acceleration data is sampled. If these intervals are long, the amount by which the suntimes change might also by quite big. Using the sun indicator on data sets with long intervals between acceleration samples might not work very well.

Author(s)

Wanja Rast

References

Sunlines are calculated using the maptools package

See Also

acto

Examples

data("acto.data")

acto_odba(data = acto.data , time = "timestamp" , ODBA = "ODBA")

wanjarast/accelerateR documentation built on June 21, 2022, 3:29 p.m.