[R] Vector and String

pbrouilly@gphy.campus.univ-poitiers.fr pbrouilly at gphy.campus.univ-poitiers.fr
Fri Oct 22 10:19:43 CEST 2004


Hi everybody,

I'm using a vector to strore some strings.

I create a vector named seq2 :
> seq2<-vector(length=0)

I have a string named b
> b
[1] CATGGTAGGAATAC

I put b in the vector
> seq2<-c(seq2,b)

Finally I edit seq2
> seq2
[1] "14760"

My question is why I obtained a number (14760) when I add a string (CATGGTAGGAATAC)

I have an idea : when I edit b, I see ( [1] CATGGTAGGAATAC ) 
and not ([1] "CATGGTAGGAATAC") 

How can I convert b to a true string with "" 

Thank you very much




More information about the R-help mailing list