prep_dataset | R Documentation |
Prep a dataset by removing variables, remove incomplete cases, aggregating specified columns, and applying threshold/labeling to the aggregated column
prep_dataset( x = read_dataset(), complete_cases_only = TRUE, lump_var = "Calanus finmarchicus", lump_fun = dplyr::starts_with, drop_var = c("geometry", "longitude", "latitude", "station", "year", "siconc", "sithick", complement_species(lump_var)), drop_fun = dplyr::starts_with, log_var = c("bathymetry", "chlor_a"), newname = "patch", threshold = 10000 )
x |
tibble of input data |
complete_cases_only |
logical, if TRUE drop incomplete records (after deselection) |
lump_var |
character character, vector of variables to sum into a new column |
lump_fun |
function, such as |
drop_var |
character, the variables to deselect |
drop_fun |
function, such as |
log_var |
character, variables to log scale (base 10), match with |
newname |
character the name of the new aggregated colum |
threshold |
numeric, the threshold(s) used to define patches |
a tibble cleaned and transformed for downstream processing
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.