pluck_parameter | R Documentation |
All pluck funtions are wrappers around dplyr::filter()
. The dots arguments are converted in a vector and then each
function searchs the specific column with the %in%
operator.
pluck_parameter(data, ...)
pluck_interval(data, ...)
pluck_site(data, ...)
pluck_unit(data, ...)
pluck_year(data, ...)
data |
input data in rolf format |
... |
elements to get as strings or integers |
filtered input data
The first implementation supported symbols as dots arguments. On windows the symbol gets converted to the native
encoding without the encoding mark. Is the converted symbol now compared to UTF-8 strings it doesn't match. One
example would be strings like "°C" or "µg/m3". See rlang::as_string()
fn <- system.file("extdata", "smn_multi.txt", package = "rOstluft.data")
data <- read_smn_multiple(fn) %>% dplyr::arrange(starttime)
pluck_parameter(data, "ta1towb0")
# strings or symbols
pluck_site(data, "KLO", "UEB")
# supports splicing with !!!
intervals = c("h1", "d1")
pluck_interval(data, !!!intervals) %>% dplyr::slice(40:45)
# pluck_year supports vector
pluck_year(data, 2010:2012)
# NAs in data aren't a problem
pluck_unit(data, "hPa")
# pipe friendly
data %>%
pluck_site("KLO", "UEB") %>%
pluck_parameter("gre000z0") %>%
pluck_year(2010:2018)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.