Skip to content

Instantly share code, notes, and snippets.

@PietrH
Created July 15, 2019 06:59
Show Gist options
  • Save PietrH/01af64a8eb3cc8a7b0e88bd4a692d86f to your computer and use it in GitHub Desktop.
Save PietrH/01af64a8eb3cc8a7b0e88bd4a692d86f to your computer and use it in GitHub Desktop.
Frequency table of character length
library(dplyr)
#we want to produce a frequency table of the length (nchar) of a column 'column' of our dataframe 'dataset'
mutate(dataset,nchar=nchar(column)) %>% count(nchar)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment