Hi,

sapply(levels(df[,"SEQUENCE"]), nchar)

Where 'df' is your data.frame

-- 
Henrique Dallazuanna
Curitiba-Paraná-Brasil
25° 25' 40" S 49° 16' 22" O

On 05/09/07, João Fadista <Joao.Fadista@agrsci.dk> wrote:
>
> Dear all,
>
> 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.
>
>
> Best regards,
> João Fadista
>
>         [[alternative HTML version deleted]]
>
>
> ______________________________________________
> 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.
>
>

	[[alternative HTML version deleted]]

