View source: R/add_by_id_and_range.R
add_by_id_and_range | R Documentation |
Function to add a variable by testing an identifier and a range.
add_by_id_and_range(df, test, df_map, by, min, max, add)
df |
Data frame to test. |
test |
Variable in |
df_map |
Mapping data frame containing |
by |
An identifying variable (or up to three) in both |
min , max |
Variables in |
add |
Variable in |
Tibble.
Stuart K. Grange
## Not run:
# Add a site variable based on sensor_id and date ranges to an observation
# table containing time series
add_by_id_and_range(
data_observations,
test = "date",
df_map = data_site_ranges,
by = "sensor_id",
min = "date_start",
max = "date_end",
add = "site"
)
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.