monitor_replaceData: Replace ws_monitor Data with Another Value

View source: R/monitor_replaceData.R

monitor_replaceDataR Documentation

Replace ws_monitor Data with Another Value

Description

Use an R expression to identify values for replacement.

The RR expression given in filter is used to identify elements in ws_monitor$data that should be replaced. Typical usage would include

  1. replacing negative values with 0

  2. replacing unreasonably high values with NA

Expressions should use data for the left hand side of the comparison.

Usage

monitor_replaceData(ws_monitor, filter, value)

Arguments

ws_monitor

ws_monitor object

filter

an RR expression used to identify values for replacement

value

replacement value

Examples

library(PWFSLSmoke)

wa <- monitor_subset(Northwest_Megafires, stateCodes = 'WA')
wa_zero <- monitor_replaceData(wa, data < 0, 0)

MazamaScience/PWFSLSmoke documentation built on July 3, 2023, 11:03 a.m.