Skip to contents

This function computes the stationary periods from classified acceleration data (pam$acceleration$ismig).

Usage

pam_sta(pam)

Arguments

pam

PAM logger dataset list. See pam_read().

Value

Same as input pam but with (1) a new data.frame of stationary periods pam$sta and (2) a new column sta_id for pressure and light data.

Examples

pam <- pam_read(
  pathname = system.file("extdata/0_PAM/18LX", package = "GeoPressureR")
)
pam <- trainset_read(pam,
  pathname = system.file("extdata/1_pressure/labels", package = "GeoPressureR")
)
pam <- pam_sta(pam)
head(pam$pressure)
#>                  date obs isoutlier sta_id
#> 1 2017-07-27 00:00:00 989     FALSE      0
#> 2 2017-07-27 00:30:00 989     FALSE      1
#> 3 2017-07-27 01:00:00 990     FALSE      1
#> 4 2017-07-27 01:30:00 990     FALSE      1
#> 5 2017-07-27 02:00:00 989     FALSE      1
#> 6 2017-07-27 02:30:00 989     FALSE      1
head(pam$light)
#>                  date obs sta_id
#> 1 2017-07-27 00:00:00   0      0
#> 2 2017-07-27 00:05:00   0      1
#> 3 2017-07-27 00:10:00   0      1
#> 4 2017-07-27 00:15:00   0      1
#> 5 2017-07-27 00:20:00   0      1
#> 6 2017-07-27 00:25:00   0      1