jranke / pfm

R package with utilities for pesticide fate modelling
1 stars 0 forks source link

units in PEC_sw_drainage #3

Closed Lutzeli closed 1 week ago

Lutzeli commented 1 week ago

The function PEC_sw_exposit_drainage() does not provide a unit for the calculated PEC_sw_drainage.

However, when the ai_rate is of type unit (e.g. "g/ha"), this unit is retained and used for the PEC_sw_drainage (see example). This could be missleading.

> PEC_sw_exposit_drainage(480, interception = 0.5, Koc = 1424, DT50 = 15)$PEC_sw_drainage
    spring     autumn 
0.03264565 0.10044814 
> PEC_sw_exposit_drainage(as_units(480, "g/ha"), interception = 0.5, Koc = 1424, DT50 = 15)$PEC_sw_drainage
Units: [g/ha]
    spring     autumn 
0.03264565 0.10044814 
jranke commented 1 week ago

Thanks, yes, this function should be converted to use units as well...