View source: R/nzffdr_widen_habitat.R
nzffdr_widen_habitat | R Documentation |
Converts habitat variables to tidy wide format columns and appends to original dataframe. Warning, with large (>100k rows) datasets this function slow (~30 seconds).
nzffdr_widen_habitat( fishd, cols_to_expand = c("habitatFlowPercent", "habitatInstreamCoverPresent", "habitatRiparianVegPercent", "habitatSubstratePercent") )
fishd |
an NZFFD dataframe returned from nzffdr_import. |
cols_to_expand |
the habitat columns to expand, can be any combination of "habitatFlowPercent", "habitatInstreamCoverPresent", "habitatRiparianVegPercent", "habitatSubstratePercent". |
An NZFFD dataframe with added wide format columns for each of the selected habitat columns.
nzffdr_widen_habitat(nzffdr::nzffdr_data)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.