Thanks again,
A.K.
- Original Message -
From: David L Carlson
To: 'arun' ; 'R help'
Cc:
Sent: Sunday, July 1, 2012 5:09 PM
Subject: RE: [R] list to dataframe conversion-testing for identical
Yes it does have something to do with the representation of floating point
numbers.
HI All,
Thanks for your replies.
A.K.
- Original Message -
From: David Winsemius
To: arun
Cc: R help
Sent: Sunday, July 1, 2012 6:31 PM
Subject: Re: [R] list to dataframe conversion-testing for identical
On Jul 1, 2012, at 5:09 PM, David L Carlson wrote:
> Yes it does h
On Jul 1, 2012, at 5:09 PM, David L Carlson wrote:
Yes it does have something to do with the representation of floating
point
numbers. Using cbind() forces the list to become a matrix and that
forces
all of the data to become character strings since one of the list
elements
is character:
Hello,
But
> all.equal(dat1,dat2)
[1] TRUE
So I guess it does have to do with floating-point equality, all.equal
uses .Machine$double.eps. (Which could return FALSE on ocasions we would
expect TRUE, when, for instance, the tolerance could/should be
.Machine$double.eps^0.5.)
Rui Barradas
E
Yes it does have something to do with the representation of floating point
numbers. Using cbind() forces the list to become a matrix and that forces
all of the data to become character strings since one of the list elements
is character:
> set.seed(42)
> listdat1<-list(rnorm(10,20),rep(LETTERS[1:2
5 matches
Mail list logo