R/cf.R

Defines functions cf

## Format a number for better printing
## Print "- 0.3" instead of "+ -0.3"
cf <- function(x, noPlus = FALSE) {
  if (noPlus)
    ifelse(x > 0, paste0(x), paste0("-", -x))
  else
    ifelse(x > 0, paste0(" + ", x), paste0(" - ", -x))
} 

Try the netSEM package in your browser

Any scripts or data that you put into this service are public.

netSEM documentation built on Sept. 8, 2023, 5:26 p.m.