[R] as.numeric is truncating!

2009-12-29 Thread ticspd
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 character > c <- as.numeri

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.nume

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" >