Learn R Programming

AirSensor (version 1.0.2)

sensor_isSensor: Test for correct structure in a sensor object

Description

The sensor is checked for the 'sensor' class name and presence of core metadata columns:

  • ID -- Purple Air ID

  • label -- location label

  • sensorType -- PurpleAir sensor type

  • longitude -- decimal degrees E

  • latitude -- decimal degrees N

  • timezone -- Olson timezone

  • countryCode -- ISO 3166-1 alpha-2

  • stateCode -- ISO 3166-2 alpha-2

  • pwfsl_closestDistance -- distance in meters from an official monitor

  • pwfsl_closestMonitorID -- identifer for the nearest official monitor

The "pwfsl", official, monitors are obtained from the USFS AirFire site using the PWFSLSmoke R package.

Usage

sensor_isSensor(sensor = NULL)

Arguments

sensor

sensor object

Value

TRUE if sensor has the correct structure, FALSE otherwise.

Examples

Run this code
# NOT RUN {
example_sensor <- pat_createAirSensor(example_pat)
sensor_isSensor(example_sensor)

# }

Run the code above in your browser using DataLab