Skip to content

Instantly share code, notes, and snippets.

@swo
Created December 2, 2019 19:34
Show Gist options
  • Save swo/fbb01773a9d2985aae859a90c9e04597 to your computer and use it in GitHub Desktop.
Save swo/fbb01773a9d2985aae859a90c9e04597 to your computer and use it in GitHub Desktop.
significant figures
sigfig <- function(x, n = 2) {
formatC(signif(x, digits = n), digits = n, format = "fg", flag = "#")
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment