Re: [R] problem with rbind when data frame contains an date-time variable "POSIXt" "POSIXlt"

2011-02-17 Thread Andrew Anglemyer
16:25:00 > 3 3 2009-08-13 08:30:00 > 4 4 2009-08-25 10:25:00 > 5 5 2009-08-10 06:20:00 > 6 6 2009-10-09 08:20:00 > > > > No problems. > > -Original Message- > From: r-help-boun...@r-project.org [mailto:r-help-boun...@r-project.org] > On Behalf Of Andr

Re: [R] problem with rbind when data frame contains an date-time variable "POSIXt" "POSIXlt"

2011-02-17 Thread Bill.Venables
-18 16:25:00 3 3 2009-08-13 08:30:00 4 4 2009-08-25 10:25:00 5 5 2009-08-10 06:20:00 6 6 2009-10-09 08:20:00 > No problems. -Original Message- From: r-help-boun...@r-project.org [mailto:r-help-boun...@r-project.org] On Behalf Of Andrew Anglemyer Sent: Friday, 18 February 2011 3:54 PM

[R] problem with rbind when data frame contains an date-time variable "POSIXt" "POSIXlt"

2011-02-17 Thread Andrew Anglemyer
I'm trying to rbind two data frames, both with the same columns names. One of the columns is a variable with date-time and this variable is causing the rbind to fail--giving the error "Error in names(value[[jj]])[ri] <- nm : 'names' attribute [7568] must be the same length as the vector [9]" Is

Re: [R] problem with rbind on data.frames that contain data.frames

2010-06-30 Thread Michael Lachmann
On 30 Jun 2010, at 22:55, Allan Engelhardt wrote: >> > a$z=z > You are (kind of) assigning *two* columns from the data frame "z" to > the name 'z' in "a" which is probably not going to work as you > expect. R tries to be clever which may or may not be a Good Thing. > Try > > a$z1 <- z[,1]

Re: [R] problem with rbind on data.frames that contain data.frames

2010-06-30 Thread Allan Engelhardt
On 30/06/10 20:46, Michael Lachmann wrote: It took me some time to find this bug in my code. Is this a feature of R? Am I doing something wrong? > a=data.frame(x=1:10,y=1:10) > b=data.frame(x=11:20,y=11:20) > z=data.frame(1:10,11:20) > a$z=z You are (kind of) assigning *two* columns from the d

[R] problem with rbind on data.frames that contain data.frames

2010-06-30 Thread Michael Lachmann
It took me some time to find this bug in my code. Is this a feature of R? Am I doing something wrong? > a=data.frame(x=1:10,y=1:10) > b=data.frame(x=11:20,y=11:20) > z=data.frame(1:10,11:20) > a$z=z > b$z=z > rbind(a,b) Error in `row.names<-.data.frame`(`*tmp*`, value = c("1", "2", "3", "4

[R] problem with rbind

2009-01-20 Thread SNN
Hi All, I have a problem with rbind. I have data that consist of weight height .. etc of 1000 patients. I would like to find the mean and the standard deviation ( for the weight , height etc) for each gender. data<-read.table("data.txt", header=T, sep='\t') fdata=NULL for (i in 1:50){ nn<-na

Re: [R] problem with rbind

2008-08-22 Thread jim holtman
Try 'check.names=FALSE' in the read.table call. On Fri, Aug 22, 2008 at 6:02 PM, kayj <[EMAIL PROTECTED]> wrote: > > > I am trying to use rbind to have the two data on the top of each other but I > am getting an extra X on the column header and the rows are numberd , How to > get rid of this probl

[R] problem with rbind

2008-08-22 Thread kayj
I am trying to use rbind to have the two data on the top of each other but I am getting an extra X on the column header and the rows are numberd , How to get rid of this problem? I appreciate your help x1<- read.table(file="data1.txt", header=T, sep="\t") x2<-read.table(file="data2.txt", head