acto_odba | R Documentation |
Plots the overall activity of the focal animal based on the ODBA at every timestamp. The plot can center around midday or midnight.
acto_odba(data = ... , time = "..." , ODBA = "ODBA" , cutoff = 1 , night_shift = FALSE , sun = F , suncolor = "red" , timezone = "UTC" , long = ... , lat = ...)
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 |
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.
Wanja Rast
Sunlines are calculated using the maptools package
acto
data("acto.data") acto_odba(data = acto.data , time = "timestamp" , ODBA = "ODBA")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.