Trims the date range of a pat object to local time date boundaries which are within the range of data. This has the effect of removing partial-day data records and is useful when calculating full-day statistics.

pat_trimDate(pat = NULL)

Arguments

pat

PurpleAir Timeseries pat object.

Value

A subset of the given pat object.

Examples

library(AirSensor)

UTC_days <- 
  pat_filterDate(
    example_pat, 
    startdate = 20220702, 
    enddate = 20220705,
    timezone = "UTC"
  )

pat_multiPlot(UTC_days)


local_days <- pat_trimDate(UTC_days)
pat_multiPlot(local_days)