Created
November 21, 2016 12:01
-
-
Save leeper/e843f5ae25e33a9d89d20e162597d90a to your computer and use it in GitHub Desktop.
Transform p-values into "shruggies" of confidence-specific shrugginess
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
shrugp <- function(p) { | |
out <- symnum(p, cutpoints = c(0, 0.001, 0.01, 0.05, 0.10, 1.00), | |
symbols = c("(ツ)", "¯\\(ツ)/¯", "¯\\_(ツ)_/¯", "¯\\___(ツ)___/¯", "¯\\____(ツ)____/¯")) | |
as.character(out) | |
} | |
pvals <- c(0.09, 0.03, 0.002, 0.000001) | |
shrugp(pvals) | |
## [1] "¯\\___(ツ)___/¯" "¯\\_(ツ)_/¯" "¯\\(ツ)/¯" "(ツ)" | |
cat(paste0("p < ", p, ", ", shrugp(pvals), collapse = "\n"), "\n") | |
## p < 0.14, ¯\___(ツ)___/¯ | |
## p < 0.09, ¯\_(ツ)_/¯ | |
## p < 0.03, ¯\(ツ)/¯ | |
## p < 0.002, (ツ) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment