Coding Variation
A blog about molecular biology, biochemistry, genetics and computation.
Wednesday, August 18, 2010
String Lengths in R
For some reason, in R this does not do what I expect:
string = "mystring"
print( length(string) )
[1] 1
What I actually want is this function:
print( nchar(string) )
[1] 8
Newer Posts
Older Posts
Home
Subscribe to:
Posts (Atom)