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

Setting decimals = 0 no longer works in apa() #9

Open
isaactpetersen opened this issue Apr 24, 2022 · 0 comments
Open

Setting decimals = 0 no longer works in apa() #9

isaactpetersen opened this issue Apr 24, 2022 · 0 comments

Comments

@isaactpetersen
Copy link

Due to a change in R 4.1, the format() function no longer allows setting decimals = 0: https://stackoverflow.com/a/70674065/2029527. This leads to an error in the apa() function. It'd be nice to allow printing an integer when setting decimals = 0 in the apa() function.

> apa(84.5, decimals = 1)
[1] "84.5"
> apa(84.5, decimals = 0)
Error in prettyNum(.Internal(format(x, trim, digits, nsmall, width, 3L,  : 
  invalid value 0 for 'digits' argument
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