I have this string vector (for example):
str <- c(\"this is a string current trey\", \"feather rtttt\", \"tusla\", \"laq\")
Use the wc-function from the qdap package.
str <- c("this is a string current trey", "feather rtttt", "tusla", "laq") library("qdap") wc(str)
That returns:
wc(str) [1] 6 2 1 1