Skip to content

Commit

Permalink
Merge branch 'master' of https://github.com/tbates/umx
Browse files Browse the repository at this point in the history
  • Loading branch information
tbates committed Jan 31, 2025
2 parents 1b68e92 + a9d23af commit 24d6b21
Showing 1 changed file with 27 additions and 2 deletions.
29 changes: 27 additions & 2 deletions R/misc_and_utility.R
Original file line number Diff line number Diff line change
Expand Up @@ -529,6 +529,31 @@ umx_set_dollar_symbol <- function(umx.dollar.symbol = NULL, silent = FALSE) {
}
}

#' Get the alpha text
#'
#' Get umx_alpha_text. Optionally SET it blank
#'
#' @param umx_alpha_text (if empty, returns the current value)
#' @param silent If TRUE, no message will be printed.
#' @return - Current umx_alpha_text
#' @export
#' @family Get and set
#' @examples
#' library(umx)
#' umx_get_alphas() # show current state
#' umx_get_alphas("") # blank it
umx_get_alphas <- function(umx_alpha_text = NULL, silent = FALSE) {
if(is.null( umx_default_separator)) {
if(!silent){
message("Current alpha text is", omxQuotes(getOption(" umx_alpha_text")) )
}
invisible(getOption("umx_alpha_text"))
} else {
options("umx_alpha_text" = umx_alpha_text)
}
} # end umx_set_separator


#' Set the separator
#'
#' Set umx_default_separator (used in CI\[low sep high\] ). Default = ","
Expand All @@ -550,9 +575,9 @@ umx_set_separator <- function( umx_default_separator = NULL, silent = FALSE) {
if(!silent){
message("Current separator is", omxQuotes(getOption(" umx_default_separator")) )
}
invisible(getOption(" umx_default_separator"))
invisible(getOption("umx_default_separator"))
} else {
options(" umx_default_separator" = umx_default_separator)
options("umx_default_separator" = umx_default_separator)
}
} # end umx_set_separator

Expand Down

0 comments on commit 24d6b21

Please sign in to comment.