sensor_join: Join airsensor objects from different time periods

Description Usage Arguments Value Examples

View source: R/sensor_join.R

Description

AirSensor objects are "joined end-to-end" so that time ranges are extended for all sensors that appear in either sensor1 and sensor2.

Only two airsensor objects at a time may be joined.

Usage

1
sensor_join(sensor1 = NULL, sensor2 = NULL)

Arguments

sensor1

An AirSensor object.

sensor2

An AirSensor object.

Value

An airsensor object containing all data from both incoming objects.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
library(AirSensor)
setArchiveBaseUrl("http://data.mazamascience.com/PurpleAir/v1")

jan <- sensor_loadMonth("scaqmd", 202001)
feb <- sensor_loadMonth("scaqmd", 202002)
mar <- sensor_loadMonth("scaqmd", 202003)
apr <- sensor_loadMonth("scaqmd", 202004)

feb_mar <- sensor_join(feb, mar)
PWFSLSmoke::monitor_timeseriesPlot(feb_mar, style = 'gnats')

# Gaps in the time axis are filled with NA
feb_apr <- sensor_join(feb, apr)
PWFSLSmoke::monitor_timeseriesPlot(feb_apr, style = 'gnats')

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