This function calculates daily linear model values between the pm25_A and pm25_B channels. A daily r-squared value is returned in addition to the coefficients of the linear fit (slope and intercept)

PurpleAirSoH_dailyABFit_OLD(pat = NULL, aggregationPeriod = "10 min")

Arguments

pat

PurpleAir Timeseries pat object.

aggregationPeriod

The period of time over which to aggregate the data. in order to create complete pairs between the A and B channels. If there is not a complete pair, the function will return an "NA" for that day. It is recommended that this value is between "2 min" and "1 hour" The smaller the aggregation period, the longer this function will take to run. The default is set to "10 min" for this reason.

Examples

tbl <- example_pat_failure_A %>% PurpleAirSoH_dailyABFit_OLD(aggregationPeriod = "30 min") timeseriesTbl_multiPlot( tbl, ylim = c(-1,1), style = "line" )