Re: [R] as.numeric is truncating!

2009-12-29 Thread Berend Hasselman
ticspd wrote: I am trying to convert a string to a double using as.numeric However, R is truncating the results! Options(digits) is set to 7. Can anyone shed some light on this? Thanks! b[1] [1] 116.28125 summary(b[1]) Length Class Mode 1 character

Re: [R] as.numeric is truncating!

2009-12-29 Thread ticspd
ah perfect .. digits = 8 is actually 8 digits TOTAL, not 8 digits after the decimal point! setting the default to 15 works for me thank you! Berend Hasselman wrote: ticspd wrote: I am trying to convert a string to a double using as.numeric However, R is truncating the results!

Re: [R] as.numeric is truncating!

2009-12-29 Thread Peter Dalgaard
ticspd wrote: I am trying to convert a string to a double using as.numeric However, R is truncating the results! No it isn't! As someone phrased it recently, there's a difference between an object and the display of an object. Ceci n'est pas une pipe. Options(digits) is set to 7. So

Re: [R] as.numeric is truncating!

2009-12-29 Thread ticspd
thank you. and for those who didn't get the reference: http://en.wikipedia.org/wiki/Ren%C3%A9_Magritte http://en.wikipedia.org/wiki/Ren%C3%A9_Magritte Peter Dalgaard wrote: ticspd wrote: I am trying to convert a string to a double using as.numeric However, R is truncating the