Re: [R] Copy dataframe for another

2012-03-09 Thread Patrick Connolly
On Fri, 09-Mar-2012 at 06:02AM -0800, RMSOPS wrote: |> Hello |> |> Thanks for the reply. As yet I have not much experience in r, although I |> make some mistakes. |>Any tips to solve the problem of a more effective way. When we know what problem you're trying to solve, we'll have various

Re: [R] Copy dataframe for another

2012-03-09 Thread David Winsemius
On Mar 9, 2012, at 10:41 AM, David Winsemius wrote: On Mar 9, 2012, at 5:31 AM, RMSOPS wrote: Hello, the idea is to copy the d for df, with new results. x<-data.frame(name="x1",pos=4,age=20) x<-rbind(x,data.frame(name="x2",pos=5,age=20)) x<-rbind(x,data.frame(name="x3",pos=6,age=21)) x<

Re: [R] Copy dataframe for another

2012-03-09 Thread David Winsemius
On Mar 9, 2012, at 5:31 AM, RMSOPS wrote: Hello, the idea is to copy the d for df, with new results. x<-data.frame(name="x1",pos=4,age=20) x<-rbind(x,data.frame(name="x2",pos=5,age=20)) x<-rbind(x,data.frame(name="x3",pos=6,age=21)) x<-rbind(x,data.frame(name="x4",pos=7,age=24)) x<-rbind(

Re: [R] Copy dataframe for another

2012-03-09 Thread RMSOPS
Hello Thanks for the reply. As yet I have not much experience in r, although I make some mistakes. Any tips to solve the problem of a more effective way. Regards -- View this message in context: http://r.789695.n4.nabble.com/Copy-dataframe-for-another-tp4456893p4459526.html Sent from

Re: [R] Copy dataframe for another

2012-03-09 Thread Petr PIKAL
Hi > > Hello, > > the idea is to copy the d for df, with new results. > > x<-data.frame(name="x1",pos=4,age=20) > x<-rbind(x,data.frame(name="x2",pos=5,age=20)) > x<-rbind(x,data.frame(name="x3",pos=6,age=21)) > x<-rbind(x,data.frame(name="x4",pos=7,age=24)) > x<-rbind(x,data.frame(name="x5

Re: [R] Copy dataframe for another

2012-03-09 Thread RMSOPS
Hello,     the idea is to copy the d for df, with new results. x<-data.frame(name="x1",pos=4,age=20) x<-rbind(x,data.frame(name="x2",pos=5,age=20)) x<-rbind(x,data.frame(name="x3",pos=6,age=21)) x<-rbind(x,data.frame(name="x4",pos=7,age=24)) x<-rbind(x,data.frame(name="x5",pos=8,age=27)) x<-rbind

Re: [R] Copy dataframe for another

2012-03-08 Thread Sarah Goslee
What exactly are you trying to do? We can't replicate your code because we don't have your data, we don't know what your objective is, and we don't know what went wrong. Also, Null and NULL are not the same thing. On Thu, Mar 8, 2012 at 11:26 AM, RMSOPS wrote: > > I'm trying to copy the results

Re: [R] Copy dataframe for another

2012-03-08 Thread R. Michael Weylandt
What goes wrong? Your code isn't reproducible and you didn't give an error message. I'd mention that "d <- Null" does not assign NULL to d which might lead to a dimension mismatch at some point. Also, something about your loop syntax seems funny: you are looping over rows but selecting columns of y

[R] Copy dataframe for another

2012-03-08 Thread RMSOPS
I'm trying to copy the results of a dataframe to another within a cycle for but I am not able to implement the rbind, because give th d<-Null df<-NULL for(r in 2: nrow(x)) { val_user<-x.name[[r]] pos<-x.pos[[r]] -4 age <-x.age[[r]] d<-data.frame(val_user,pos,) pr

[R] Copy dataframe for another

2012-03-08 Thread RMSOPS
I'm trying to copy the results of a dataframe to another within a cycle for but I am not able to implement the rbind, because give th d<-Null df<-NULL for(r in 2: nrow(x)) { val_user<-x.name[[r]] pos<-x.pos[[r]] -4 age <-x.age[[r]] d<-data.frame(val_user,pos,)