reducePAM: Reduces the data to a specified temporal resolution

View source: R/reducePAM.R

reducePAMR Documentation

Reduces the data to a specified temporal resolution

Description

This function takesthe typical PAM_data input, which is a nested list of different sensor data, all formatted at different time resolutions. By specifying a particular sensor, all data are formatted at the same temporal resolution as this data. By default, the median of data with smaller temporal resolution are kept, and data are interpolated.

Usage

reducePAM(dta, varint, interp = TRUE, summary = "median")

Arguments

dta

raw pam data see data(bee_eater for example

varint

the variable of interest.Sipprots c("pressure","light","acceleration","temperature","magnetic"). For instance if all other variables should be summarised at the same temporal resolution as this specified variable.

interp

Default TRUE. Whether or not to replace NAs with interpolated values

summary

Can be "sum", "median" or "none". What type of summary variable to give when condensing data -

Value

reduced/summarised and interpolated dataset

Examples

#data(bee_eater)
#PAM_data = bee_eater

#start = as.POSIXct("2015-08-01","%Y-%m-%d", tz="UTC")
#end = as.POSIXct("2016-06-21","%Y-%m-%d", tz="UTC")
#PAM_data = cutPAM(PAM_data, start, end)

#reduced_dta = reducePAM(PAM_data , "pressure", interp = FALSE)
#head(reduced_dta)

#reduced_dta = reducePAM(PAM_data , "act", interp = FALSE)
#head(reduced_dta)


KiranLDA/PAMLr documentation built on March 6, 2023, 1:40 p.m.