Closed GegznaV closed 2 years ago
Basing on the lines from R/wl_convert_units.R (see this comment ):
R/wl_convert_units.R
x@label$.wavelength <- switch(.wl_fix_unit_name(to), nm = expression("Wavelength, nm"), invcm = expression(tilde(nu) / cm^-1), ev = expression("Energy / eV"), freq = expression(nu / THz), raman = expression(Raman ~ shift / cm^-1), to )
A separate function should be created. The function's signature could be wl_create_label_by_units(wl_units) wl_create_label_from_units(wl_units) and it should return an expression with label for @label$.wavelength.
wl_create_label_by_units(wl_units)
wl_create_label_from_units(wl_units)
@label$.wavelength
If this is implemented, labels in
.R
Tasks:
wl_convert_units.hyperSpec()
to
NEWS.md
constants-units.R
is by the correct preposition? @bryanhanson ?
"by" is OK, but "from" is better.
Basing on the lines from
R/wl_convert_units.R
(see this comment ):A separate function should be created. The function's signature could be
wl_create_label_by_units(wl_units)
wl_create_label_from_units(wl_units)
and it should return an expression with label for@label$.wavelength
.If this is implemented, labels in
.R
file can be deleted.Tasks:
Add unit tests forMoved to #69wl_convert_units.hyperSpec()
to test if labels are correct in all cases ofto
values.NEWS.md
constants-units.R
and close #52