R/cf.R

# 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 2, 2019, 11:27 a.m.