Re: [R] split character line into rows

2012-12-17 Thread arun
8 11.69 43 #2 2010-12-26 00:01:52 696.19 11.69 43 #3 2010-12-26 00:02:52 712.26 11.69 43 #4 2010-12-26 00:03:52 720.70 11.69 43 #5 2010-12-26 00:04:52 726.16 11.69 43 #6 2010-12-26 00:05:52 713.26 11.69 43 A.K. ________ From: Simonas Kecorius To: arun Sent: Monday, Dec

Re: [R] split character line into rows

2012-12-17 Thread Sarah Goslee
On Mon, Dec 17, 2012 at 4:43 PM, Simonas Kecorius wrote: > Hey Sarah, > thanks for quick response and your kind help. I appreciate it a lot. > You are completely right. When I input data as Arun suggested, there is no > problems. But when I try to read it from txr file - something wrong happens. >

Re: [R] split character line into rows

2012-12-17 Thread David L Carlson
boun...@r-project.org [mailto:r-help-bounces@r- > project.org] On Behalf Of arun > Sent: Monday, December 17, 2012 2:35 PM > To: Simonas Kecorius > Cc: R help > Subject: Re: [R] split character line into rows > > Hi, > This could also work: >  max(nchar(txt)) > #

Re: [R] split character line into rows

2012-12-17 Thread arun
:01:52 696.19 11.69 43 A.K. - Original Message - From: David Winsemius To: Simonas Kecorius Cc: r-help@r-project.org Sent: Monday, December 17, 2012 3:15 PM Subject: Re: [R] split character line into rows On Dec 17, 2012, at 4:04 AM, Simonas Kecorius wrote: > Hey R users, > > suppos

Re: [R] split character line into rows

2012-12-17 Thread David Winsemius
On Dec 17, 2012, at 4:04 AM, Simonas Kecorius wrote: > Hey R users, > > suppose we have data: > txt <- readLines(textConnection("[1] 2010.12.26 00:00:52688,88 11,69 43,00 [2] 11,69 43,00 [3] 11,69 43,00 [4] 11,69 43,00 [5] 11,69 43,00 [6] 11,69 43,00

Re: [R] split character line into rows

2012-12-17 Thread arun
69 43 #6 2010-12-26 00:01:52 696.19 11.69 43 A.K. - Original Message - From: Simonas Kecorius To: r-help@r-project.org Cc: Sent: Monday, December 17, 2012 7:04 AM Subject: [R] split character line into rows Hey R users, suppose we have data: [1] 2010.12.26 00:00:52    688,88          11,69 

Re: [R] split character line into rows

2012-12-17 Thread arun
From: Simonas Kecorius To: r-help@r-project.org Cc: Sent: Monday, December 17, 2012 7:04 AM Subject: [R] split character line into rows Hey R users, suppose we have data: [1] 2010.12.26 00:00:52    688,88          11,69    43,00   [2] 11,69    43,00   [3] 11,69    43,00   [4] 11,69    43,00   [5] 1

Re: [R] split character line into rows

2012-12-17 Thread Sarah Goslee
Certainly. But you'd be better advised to use dput(head(yourdata, 20)) to provide data, since we don't actually know what's in your data after it has passed through print, copy, and email. How you got it into R may also be relevant. Also, I don't see how you get from the given data to the desired

[R] split character line into rows

2012-12-17 Thread Simonas Kecorius
Hey R users, suppose we have data: [1] 2010.12.26 00:00:52688,88 11,69 43,00 [2] 11,69 43,00 [3] 11,69 43,00 [4] 11,69 43,00 [5] 11,69 43,00 [6] 11,69 43,00 [7] 11,69 43,00 [8] 11,69 43,00 [9] 11,69 43,00 [10] 11,69 43,00 [11]