[R] howto get significant digits for round()

Jonas Stein news at jonasstein.de
Wed May 14 23:31:35 CEST 2008


i have a table like this of an value and its tolerance

length   delta-length
12.2232  0.4
123.422  0.034123
1234     12

i want to round the value to the significant digits in this way:

my-round(length,delta-length)

12.2   ,  0.4
123.42 ,  0.03
1234   ,  12

how can i do this with R? 

please CC to email,
thanks so far,

-- 
Jonas Stein <news at jonasstein.de>



More information about the R-help mailing list