Skip to contents

This function plucks the data for one parameter. If multiple combinations of parameter, unit and interval exists it is necessary to specify which unit and/or interval to pluck.

Usage

rolf_to_openair_single(
  data,
  parameter = NULL,
  unit = NULL,
  interval = NULL,
  keep_interval = FALSE
)

Arguments

data

containing the parameter in rolf format

parameter

to pluck

unit

Optional: unit of the parameter to pluck. Default NULL

interval

Optional: interval of the parameter to pluck. Default NULL

keep_interval

Optional: keep interval column. Default FALSE

Value

tibble with one parameter in openair compatible format including unit, site and optional interval column

Examples

h1 <- system.file("extdata", "Zch_Stampfenbachstrasse_h1_2013_Jan.csv",
                   package = "rOstluft.data", mustWork = TRUE)

airmo_h1 <- read_airmo_csv(h1)
rolf_to_openair_single(airmo_h1, "NO2", unit = "\u00b5g/m3", keep_interval = TRUE)
#> # A tibble: 742 × 5
#>    date                site                    interval unit    NO2
#>    <dttm>              <fct>                   <fct>    <fct> <dbl>
#>  1 2013-01-01 00:00:00 Zch_Stampfenbachstrasse h1       µg/m3  63.9
#>  2 2013-01-01 01:00:00 Zch_Stampfenbachstrasse h1       µg/m3  61.6
#>  3 2013-01-01 02:00:00 Zch_Stampfenbachstrasse h1       µg/m3  60.9
#>  4 2013-01-01 03:00:00 Zch_Stampfenbachstrasse h1       µg/m3  56.7
#>  5 2013-01-01 04:00:00 Zch_Stampfenbachstrasse h1       µg/m3  59.2
#>  6 2013-01-01 05:00:00 Zch_Stampfenbachstrasse h1       µg/m3  46.9
#>  7 2013-01-01 06:00:00 Zch_Stampfenbachstrasse h1       µg/m3  46.5
#>  8 2013-01-01 07:00:00 Zch_Stampfenbachstrasse h1       µg/m3  44.2
#>  9 2013-01-01 08:00:00 Zch_Stampfenbachstrasse h1       µg/m3  21.2
#> 10 2013-01-01 09:00:00 Zch_Stampfenbachstrasse h1       µg/m3  21.1
#> # ℹ 732 more rows