View source: R/make_strata_desc.R
make_strata_desc | R Documentation |
make_strata_desc
make_strata_desc(x, remove = FALSE)
x |
data.frame with column STRATA_USED and the associated, named columns |
remove |
logical indicating whether to return just summarized descriptions or full data set with the new columns added. |
Make the strata description based on the STRATA_USED and associated columns
data frame of trips and discards
Daniel Hocking, Benjamin Galuardi
## Not run:
library(dplyr)
library(tidyr)
library(stringr)
foo <- data.frame(
STRATA_USED = c("A", "A;B", "B;C", "A;B;C", "A;B", "A", "", NA_character_, NA_character_),
A = c("A1", "A2", "A3", "A4", "", NA_character_, NA_character_, NA_character_, "A8"),
B = c("B1", "B2", "B3", "B4", "B5", "B6", NA_character_, NA_character_, NA_character_#' ),
#' C = c("C1", "C2", "C3", "C4", "C5", "C6", NA_character_, NA_character_, "C8")
)
make_strata_desc(foo)
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.