Description Usage Arguments Value Examples
View source: R/short_generic.R
Determine the maximum length of each set of strings in the columns of a dataframe. Non-character values will be reported as NA.
1 | check_max_char(dat, return_names = c("col_name", "max_chars"))
|
dat |
a dataframe that can include a mix of datatypes |
return_names |
A vector of two names for the return dataframe. |
A dataframe reporting the max(nchar(0)
of
all columns in data
. Non-character datatypes
will return NA.
1 2 3 4 5 6 7 8 9 | # Create example dataframe
fish_report = tibble::tibble(
species = c("coho", "coho", "chin", "steelhead"),
fish_method = c("Gillnet", "Seine", "Fish trap",
"Recreational angler"),
total_length = c(660, 589, 815, 450))
# Report max length of strings in each column
fish_nchar = check_max_char(fish_report)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.