tests/testthat/test-pat_aggregate.R

context("test-pat_aggregate")

test_that('Alternative aggregation', {
  data("example_pat")
  # Test aggregation settings to test default settings
  expect_true(identical(
    pat_aggregate(example_pat, 
                  FUN = function(x) mean(x,na.rm = TRUE)), 
    pat_aggregate(example_pat, 
                  FUN = function(x) mean(x, na.rm = TRUE), 
                  unit = 'minutes', 
                  count = 60)
  ))
  
})

Try the AirSensor package in your browser

Any scripts or data that you put into this service are public.

AirSensor documentation built on March 13, 2021, 1:07 a.m.