How do you find the length of a string in R?
a) strlen()
b) length()
c) nchar()
d) str_len()
Answer:
c) nchar()
Explanation:
The nchar()
function in R returns the number of characters in a string.
The nchar()
function in R returns the number of characters in a string.