readLines
or stri_read_lines
function, where each text line' is represented by a
separate string.stri_stats_general(str)
Lines
- number of lines
(number of non-missing strings in the vector);LinesNEmpty
- number of lines with at least one
non-WHITE_SPACE
character;Chars
-
total number of Unicode code points detected;CharsNWhite
- number of Unicode code points that are
notWHITE_SPACE
s;\r
or
\n
characters, otherwise you will get at error.Below by `white space` we mean the Unicode binary property
WHITE_SPACE
, see stringi-search-charclass
.
stri_stats_latex
s <- c("Lorem ipsum dolor sit amet, consectetur adipisicing elit.",
"nibh augue, suscipit a, scelerisque sed, lacinia in, mi.",
"Cras vel lorem. Etiam pellentesque aliquet tellus.",
"")
stri_stats_general(s)
Run the code above in your browser using DataLab