79446419

Date: 2025-02-17 19:28:42
Score: 1.5
Natty:
Report link

Is this what you want?

sigfig <- function(x, dig = 3){
  gsub("\\.$", "", formatC(signif(x,digits=dig), digits=dig, format="fg", flag="#", big.mark = ","))
}
sigfig(c(0.3459215,0.6227059,7.409618,462.3468600,9.090436,6293.4189000))

[1] "0.346" "0.623" "7.41"  "462"   "9.09"  "6,290"
Reasons:
  • Low length (0.5):
  • Has code block (-0.5):
  • Ends in question mark (2):
  • Starts with a question (0.5): Is this
  • High reputation (-1):
Posted by: dog