I think the issue is that cbind applied to a vector or matrix drops
classes.
It seems that data.frame() should have been used to combine columns here.
On Mon, 25 Aug 2008, Charles Plessy wrote:
Le Sun, Aug 24, 2008 at 10:56:43PM -0700, Yuan Jian a écrit :
hi,
when I used cbind to combine col
lt;[EMAIL PROTECTED]>
Subject: Re: [R] cbind in data.frame
To: r-help@r-project.org
Date: Monday, August 25, 2008, 6:09 AM
Le Sun, Aug 24, 2008 at 10:56:43PM -0700, Yuan Jian a écrit :
> hi,
> when I used cbind to combine columns, some contents of columns has been
replaced by
> number
Le Sun, Aug 24, 2008 at 10:56:43PM -0700, Yuan Jian a écrit :
> hi,
> when I used cbind to combine columns, some contents of columns has been
> replaced by
> number. in the script below, column should be aaa,bbb,ccc but I was given
> 1,2,3.
> but when I change the column to vector, it gave me cor
hi,
when I used cbind to combine columns, some contents of columns has been
replaced by
number. in the script below, column should be aaa,bbb,ccc but I was given 1,2,3.
but when I change the column to vector, it gave me correct contents. can you
please
tell me why?
> d<-read.table("aaa.txt")
>
4 matches
Mail list logo