r-quantities / units

Measurement units for R
https://r-quantities.github.io/units
172 stars 27 forks source link

Compatibility between `units` and `errors` library #330

Closed ekatko1 closed 1 year ago

ekatko1 commented 1 year ago

I'm not sure which library this should should be an issue with, but it would be great to have numbers with both units and errors:

set_errors( set_units(5, g) )

currently, this operation is giving me the following error:

Error in UseMethod("set_errors") : 
  no applicable method for 'set_errors' applied to an object of class "units"
edzer commented 1 year ago

That's what the package "quantities" was developed for.

Enchufa2 commented 1 year ago

We have:

library(quantities)
#> Loading required package: units
#> udunits database from /usr/share/udunits/udunits2.xml
#> Loading required package: errors

set_errors(set_units(5, g), 0.1)
#> 5.0(1) [g]

See the project page for further details.

ekatko1 commented 1 year ago

Oh I see now, thank you so much!! Egor

On Thu, 1 Dec 2022 at 16:02, Iñaki Ucar @.***> wrote:

We have:

library(quantities)#> Loading required package: units#> udunits database from /usr/share/udunits/udunits2.xml#> Loading required package: errors

set_errors(set_units(5, g), 0.1)#> 5.0(1) [g]

See the project page https://r-quantities.github.io/quantities/ for further details.

— Reply to this email directly, view it on GitHub https://github.com/r-quantities/units/issues/330#issuecomment-1334439635, or unsubscribe https://github.com/notifications/unsubscribe-auth/AGN6CSLGYMCU26SDGBQLOF3WLEG6LANCNFSM6AAAAAASRF5NSM . You are receiving this because you authored the thread.Message ID: @.***>