nchars_row <- function(df) {
require(tidyverse)
nrows <- tibble()
for (i in 1:nrow(df)) {
temp <- df %>%
slice(i)
temp <- nchar(temp)
nrows <- bind_rows(nrows,temp)
}
nrows$total_chars <- rowSums(nrows)
return(nrows)
}
too_many_chars <- function(df,number) {
x <- df %>%
mutate(over = total_chars > number) %>%
filter(over == TRUE) %>%
pull(over)
return(x)
}
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.