R/fround.R

Defines functions fround

fround<-function(X,digits=3,leading,...) { 
  if (!missing(leading)) { 
    leading<-leading+digits+1
  } else {
    leading<-""
  }
  return(sprintf(fmt=paste0('%',leading,'.',digits,'f'),round(X,digits=digits,...)))
}
AngusWright/helpRfuncs documentation built on Nov. 17, 2024, 4:37 a.m.