[R] reading a string vector

2010-01-26 Thread bia.estat
Hi, I need to read a string vector in R which is like this atgctctaatcgtcccaacaattatattactaccac, but R seems to understand it as a unique vector input when I read in like x - atgctctaatcgtcccaacaattatattactaccac. How do I unconcatenate it, so I can use each of the letters on my reading?

Re: [R] reading a string vector

2010-01-26 Thread Ista Zahn
Like this? strsplit(atgctctaatcgtcccaacaattatattactaccac, split=) -Ista On Tue, Jan 26, 2010 at 8:08 AM, bia.estat bia@live.com wrote: Hi, I need to read a string vector in R which is like this atgctctaatcgtcccaacaattatattactaccac, but R seems to understand it as a unique vector

Re: [R] reading a string vector

2010-01-26 Thread Romain Francois
On 01/26/2010 02:08 PM, bia.estat wrote: Hi, I need to read a string vector in R which is like this atgctctaatcgtcccaacaattatattactaccac, but R seems to understand it as a unique vector input when I read in like x- atgctctaatcgtcccaacaattatattactaccac. How do I unconcatenate it, so I can

Re: [R] reading a string vector

2010-01-26 Thread Henrique Dallazuanna
Try this: strsplit(atgctctaatcgtcccaacaattatattactaccac, NULL) On Tue, Jan 26, 2010 at 11:08 AM, bia.estat bia@live.com wrote: Hi, I need to read a string vector in R which is like this atgctctaatcgtcccaacaattatattactaccac, but R seems to understand it as a unique vector input

Re: [R] reading a string vector

2010-01-26 Thread bia.estat
thanks, it was exactly what i needed. -- View this message in context: http://n4.nabble.com/reading-a-string-vector-tp1290289p1310721.html Sent from the R help mailing list archive at Nabble.com. __ R-help@r-project.org mailing list

[R] reading a string

2009-08-13 Thread Mohsen Jafarikia
Hello All: I am having the following data file named data.dat Number of people Number of pets Age of trees ifn - data.dat dat - read.table(ifn) colnames(dat)-c(Variables) I want R to read all these in a string but when I ask R to read these, it gives me error because there more than one

Re: [R] reading a string

2009-08-13 Thread Henrique Dallazuanna
Use readLines indeed. On Thu, Aug 13, 2009 at 3:21 PM, Mohsen Jafarikia jafari...@gmail.comwrote: Hello All: I am having the following data file named data.dat Number of people Number of pets Age of trees ifn - data.dat dat - read.table(ifn) colnames(dat)-c(Variables) I want R to