On 9/5/07, João Fadista <[EMAIL PROTECTED]> wrote:
> I would like to know how can I compute the length of a string in a dataframe. 
> Example:
>
> SEQUENCE                               ID
> TGCTCCCATCTCCACGG            HR04FS000000645
> ACTGAACTCCCATCTCCAAT      HR00000595847847
>
> I would like to know how to compute the length of each SEQUENCE.

Maybe the following code?

> data
                    var1 var2
1       This is a string   12
2 This is another string   34
> nchar(data[,1])
[1] 16 22
>

Paul

______________________________________________
R-help@stat.math.ethz.ch 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.

Reply via email to