Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Create function wl_create_label_from_units() #60

Closed
4 tasks done
GegznaV opened this issue Aug 12, 2021 · 2 comments
Closed
4 tasks done

Create function wl_create_label_from_units() #60

GegznaV opened this issue Aug 12, 2021 · 2 comments

Comments

@GegznaV
Copy link
Member

GegznaV commented Aug 12, 2021

Basing on the lines from R/wl_convert_units.R (see this comment ):

  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.

If this is implemented, labels in


Tasks:

@GegznaV GegznaV added this to the 1.0 CRAN submission milestone Aug 12, 2021
@GegznaV GegznaV changed the title Create function wl_get_label_by_units() Create function wl_create_label_by_units() Aug 12, 2021
@GegznaV GegznaV removed this from the 1.0 CRAN submission milestone Aug 12, 2021
@cbeleites
Copy link
Collaborator

is by the correct preposition? @bryanhanson ?

@bryanhanson
Copy link
Contributor

"by" is OK, but "from" is better.

@GegznaV GegznaV changed the title Create function wl_create_label_by_units() Create function wl_create_label_from_units() Nov 15, 2021
@GegznaV GegznaV closed this as completed Dec 14, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants