Closed ghost closed 5 years ago
Because the conversion is wrong. You are missing an "m" in the denominator: it's "kgf/m^3".
Sorry, I want to convert pressure units. See, kgf/cm² to cmH2O or ftH2O works fine:
> p<- set_units(1,kgf/cm^2)
> p
1 [kgf/cm^2]
> units(p)<-"cmH2O"
> p
1000 [cmH2O]
> units(p)<-"ftH2O"
> p
32.8084 [ftH2O]
> units(p)<-"mH2O"
Error: cannot convert ftH2O into mH2O
Does mH2O means meter of water head? @Enchufa2
mH2O means milli-H2O, and H2O, according to the database, specifies the acceleration at the Earth's surface of a substance with the density of water.
How can I add manually meH20 (meters) like cmH20 (centimeters) on database? Is it possible @Enchufa2 ?
This is not a unit, but a product of units, so I recommend to treat that accordingly. These versions work fine:
set_units(set_units(1, "cm H2O"), "m H2O")
set_units(set_units(1, "cm*H2O"), "m*H2O")
OK, but see at valid_udunits. We also have cmH2O at database so I can use cmH2O as symbolic. I would like to use meH2O (meters) as symbolic too. Of course If I use m*H2O
works fine or cm*H2O
.
Then, see ?install_conversion_constant
:
install_conversion_constant("cmH2O", "meH2O", 0.01)
Thank you for the support! That's what I would like to do.
I suggest to include meH2O in the next package version, It's a very common unit used in hydraulics.
Hi @edzer, what I should be done? Opened the issue here or suggested the meH2O?Or both?
If you want to add a unit to udunits, don't add it to this R package but to the udunits-2 library it interfaces. We are not the only users of that library.
In other words, @ArturIndio, you should open an issue in the udunits-2 repo to propose that change.
OK, I understood. Thanks.
On Mon, May 20, 2019, 14:37 Iñaki Ucar notifications@github.com wrote:
In other words, @ArturIndio https://github.com/ArturIndio, you should open an issue in the udunits-2 repo to propose that change.
— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/r-quantities/units/issues/207?email_source=notifications&email_token=ACJSLXSALMSCOO5AUFVC3U3PWLOWHA5CNFSM4HN5NE3KYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGODVZRUCQ#issuecomment-494082570, or mute the thread https://github.com/notifications/unsubscribe-auth/ACJSLXTOAXI4WBVFA2UQNPLPWLOWHANCNFSM4HN5NE3A .
Why I can not convert kgf/m^2 to mH2O? Or ftH2O to mH2O?
a<- 2 unit(a)<- "kgf/m^2" units(a) <- with(ud_units,mH2O) Error: cannot convert kgf/m^2 into mH2O