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 gSEM package in your browser

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

gSEM documentation built on May 30, 2017, 2:59 a.m.