Description Usage Arguments Examples
For easy kable-izing, take a sample of a dataframe and trim a single column (usually a long string)
1 | trim_content(df, col = content, last_char = 50, sample_some = 3)
|
df |
Input dataframe |
col |
Unquoted column name of character column |
last_char |
Starting at character 1, how what's the last character that should be included. |
sample_some |
Number of rows to sample. If NULL, all rows are retained. |
1 2 3 4 5 6 7 8 9 10 | tbl <- janeaustenr::northangerabbey[100:109] %>%
tibble::enframe() %>%
dplyr::rename(
content = value
) %>%
dplyr::mutate(
num = runif(10)
)
tbl %>% trim_content(last_char = 5, sample_some = 7)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.