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

scientific.notation does not respect parameters for lists #144

Open
nwiltsie opened this issue Jul 25, 2023 · 0 comments
Open

scientific.notation does not respect parameters for lists #144

nwiltsie opened this issue Jul 25, 2023 · 0 comments

Comments

@nwiltsie
Copy link
Member

https://github.com/uclahs-cds/public-R-BoutrosLab-plotting-general/blob/982f2c7287f802a133c1e1d71d2b95e44464771d/R/scientific.notation.R#L13-L23

This recursive call strips away the digits and expression parameters so that calling this function on a list does not give the expected result:

> c(scientific.notation(1.234e8, digits = 2), scientific.notation(654.32e8, digits = 2))
expression("1.23" %*% 10^8, "6.54" %*% 10^10)
> scientific.notation(c(1.234e8, 654.32e8), digits = 2)
expression("1.2" %*% 10^8, "6.5" %*% 10^10)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant