[R] Length of string?

Timothy Bates timothy.c.bates at gmail.com
Mon Oct 24 17:32:02 CEST 2011


Dear Kevin,
# this works
nchar("read the help for length”)
[1] 24


On 24 Oct 2011, at 4:14 PM, Kevin Burton wrote:

> This is very basic but I have not been able to find an answer. Basically I
> want to find the length of a string.
> 
> length("Text")
> 
> returns 1 so I know that is not right.
> 
> Thank you.
> 
> Kevin
> 
> ______________________________________________
> R-help at r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
> and provide commented, minimal, self-contained, reproducible code.



More information about the R-help mailing list