Re: [R] list to dataframe conversion-testing for identical

2012-07-01 Thread arun
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.

Re: [R] list to dataframe conversion-testing for identical

2012-07-01 Thread arun
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

Re: [R] list to dataframe conversion-testing for identical

2012-07-01 Thread David Winsemius
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:

Re: [R] list to dataframe conversion-testing for identical

2012-07-01 Thread Rui Barradas
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

Re: [R] list to dataframe conversion-testing for identical

2012-07-01 Thread David L Carlson
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