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

A formatter for p-values #145

Merged
merged 1 commit into from
Jul 9, 2018
Merged

A formatter for p-values #145

merged 1 commit into from
Jul 9, 2018

Conversation

larmarange
Copy link
Contributor

cf. #144

@larmarange
Copy link
Contributor Author

larmarange commented Jul 6, 2018

Just a quick question: is it better to have an accuracy argument, consistent with number_format or would you prefer for this specific formatter a digits argument?

@larmarange larmarange force-pushed the pvalue_format branch 3 times, most recently from 89a6cec to 240c6e7 Compare July 7, 2018 15:35
Copy link
Member

@hadley hadley left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I definitely prefer accuracy()

R/formatter.r Outdated
#' custom_function <- pvalue_format(accuracy = .1, decimal.mark = ",")
#' custom_function(p)
pvalue_format <- function(accuracy = .001, decimal.mark = ".", add_p = FALSE) {
function(x) pvalue(
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Need to force the 3 arguments

@larmarange
Copy link
Contributor Author

done

@hadley hadley merged commit 419236a into r-lib:master Jul 9, 2018
@hadley
Copy link
Member

hadley commented Jul 9, 2018

Thanks!

@larmarange larmarange deleted the pvalue_format branch July 10, 2018 08:37
This pull request was closed.
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

Successfully merging this pull request may close these issues.

2 participants