Re: [R] Insert row in specific location between data frames

2012-07-02 Thread pigpigmeow
I have already follow your step, it still not work when I merge groupA and groupB , the error message was shown Error in rbind(deparse.level, ...) : replacement has length zero -- View this message in context: http://r.789695.n4.nabble.com/Insert-row-in-specific-location-between-data-frames-tp463

Re: [R] Insert row in specific location between data frames

2012-07-02 Thread Rui Barradas
Hello, When I've asked you to dput() your datasets, I meant all of the output of dput(), for us to copy it and paste in an R session. It is the easiest way of recreating exact copies of the objects. Like this, with those "" it's unusable. Now, as far as I can see, you have a

Re: [R] Insert row in specific location between data frames

2012-07-01 Thread pigpigmeow
First, I have "predict_SO2_a" which is contained 24 data. I want to insert "NA" in 11th row. Then, "predict_SO2_a" becomes 25 data. After insert the row, I want to use "with" function to combine the data.frame />groupA$predict_SO2<-with(groupA, predict_SO2_a). / />dput(predict_SO2_a) c(39.793230812

Re: [R] Insert row in specific location between data frames

2012-07-01 Thread David Winsemius
On Jul 1, 2012, at 1:33 AM, pigpigmeow wrote: i'm not success to insert row in specific location and merge another file I have a question and I feel confused about the usage of "rbind", "cbind" and "data.frame) data 1: predict_SO2_a predict_SO2_a 1 39.793231 2 30.252578

Re: [R] Insert row in specific location between data frames

2012-07-01 Thread Rui Barradas
Hello, Please use dpu() to post your datasets. Example: dput(predict_SO2_b) # paste the output of this in a post Hope this helps, Rui Barradas Em 01-07-2012 06:33, pigpigmeow escreveu: i'm not success to insert row in specific location and merge another file I have a question and I feel

Re: [R] Insert row in specific location between data frames

2012-07-01 Thread pigpigmeow
i'm not success to insert row in specific location and merge another file I have a question and I feel confused about the usage of "rbind", "cbind" and "data.frame) data 1: > predict_SO2_a predict_SO2_a 1 39.793231 2 30.252578 3 32.467584 4 31.941509 5 27.908320

Re: [R] Insert row in specific location between data frames

2012-06-29 Thread arun
--- Original Message - From: Peter Ehlers To: arun Cc: pigpigmeow ; R help Sent: Friday, June 29, 2012 5:19 PM Subject: Re: [R] Insert row in specific location between data frames On 2012-06-29 11:08, arun wrote: > Hi, > > You can try this: > > dat1<-read.table(text=" >

Re: [R] Insert row in specific location between data frames

2012-06-29 Thread Peter Ehlers
ore than one column in your dataframe. Peter Ehlers - Original Message - From: pigpigmeow To: r-help@r-project.org Cc: Sent: Friday, June 29, 2012 1:01 PM Subject: [R] Insert row in specific location between data frames Hi everyone! I have a simple question. my data is predict_SO2_a

Re: [R] Insert row in specific location between data frames

2012-06-29 Thread David L Carlson
12 2:01 PM > To: dcarl...@tamu.edu > Cc: R help > Subject: Re: [R] Insert row in specific location between data frames > > Hi David, > > I am getting error messages with the code. > dat1<-read.table(text=" > predict_SO2_a > 1  39.793231 > 2  30.252578

Re: [R] Insert row in specific location between data frames

2012-06-29 Thread arun
Friday, June 29, 2012 1:04 PM > To: pigpigmeow > Cc: r-help@r-project.org > Subject: Re: [R] Insert row in specific location between data frames > > > On 2012-06-29 10:01, pigpigmeow wrote: > > Hi everyone! I have a simple question. > > > > my data is > > 

Re: [R] Insert row in specific location between data frames

2012-06-29 Thread David Winsemius
On Jun 29, 2012, at 2:48 PM, Peter Ehlers wrote: On 2012-06-29 11:29, David Winsemius wrote: On Jun 29, 2012, at 2:04 PM, Peter Ehlers wrote: On 2012-06-29 10:01, pigpigmeow wrote: Hi everyone! I have a simple question. my data is predict_SO2_a 1 39.793231 2 30.252578 3

Re: [R] Insert row in specific location between data frames

2012-06-29 Thread arun
t.org Cc: Sent: Friday, June 29, 2012 1:01 PM Subject: [R] Insert row in specific location between data frames Hi everyone! I have a simple question. my data is predict_SO2_a 1      39.793231 2      30.252578 3      32.467584 4      31.941509 5      27.908320 6      11.594137 7   

Re: [R] Insert row in specific location between data frames

2012-06-29 Thread Peter Ehlers
On 2012-06-29 11:29, David Winsemius wrote: On Jun 29, 2012, at 2:04 PM, Peter Ehlers wrote: On 2012-06-29 10:01, pigpigmeow wrote: Hi everyone! I have a simple question. my data is predict_SO2_a 1 39.793231 2 30.252578 3 32.467584 4 31.941509 5 27.908320 6

Re: [R] Insert row in specific location between data frames

2012-06-29 Thread David Winsemius
On Jun 29, 2012, at 2:04 PM, Peter Ehlers wrote: On 2012-06-29 10:01, pigpigmeow wrote: Hi everyone! I have a simple question. my data is predict_SO2_a 1 39.793231 2 30.252578 3 32.467584 4 31.941509 5 27.908320 6 11.594137 79.368125 8 12.31

Re: [R] Insert row in specific location between data frames

2012-06-29 Thread David L Carlson
g > Subject: Re: [R] Insert row in specific location between data frames > > > On 2012-06-29 10:01, pigpigmeow wrote: > > Hi everyone! I have a simple question. > > > > my data is > > predict_SO2_a > > 1 39.793231 > > 2 30.252578 >

Re: [R] Insert row in specific location between data frames

2012-06-29 Thread Peter Ehlers
On 2012-06-29 10:01, pigpigmeow wrote: Hi everyone! I have a simple question. my data is predict_SO2_a 1 39.793231 2 30.252578 3 32.467584 4 31.941509 5 27.908320 6 11.594137 79.368125 8 12.319093 9 11.558811 10 7.937192 11 11

Re: [R] Insert row in specific location between data frames

2012-06-29 Thread Rui Barradas
Hello, If you print 'topdata' and 'bottomdata' you'll see that they are not data.frames, they're vectors. This is because you are extracting one column only, which happens to be the only one. Solution: use c(). topdata <- predict_SO2_a[1:10, ] bottomdata <- predict_SO2_a[11:nrow(predict_SO2_a

[R] Insert row in specific location between data frames

2012-06-29 Thread pigpigmeow
Hi everyone! I have a simple question. my data is predict_SO2_a 1 39.793231 2 30.252578 3 32.467584 4 31.941509 5 27.908320 6 11.594137 79.368125 8 12.319093 9 11.558811 10 7.937192 11 11.211306 12 12.400342 13 12.39314