#' @export
muRownames <- function(x, ...) {
UseMethod("muRownames")
}
#' @S3method muRownames default
muRownames.default <- function(x, stratVariable, data,
useVarName = TRUE, ...) {
lab <- label(x)
if((lab == "") && useVarName)
lab <- "Unlabeled variable"
class(lab) <- "muRownamesNumeric"
lab
}
#' @S3method muRownames factor
muRownames.factor <- function(x, stratVariable, data,
useVarName = TRUE, ...) {
lab <- label(x)
if((lab == "") && useVarName)
lab <- "Unlabeled variable"
ret <- c(lab, levels(x))
class(ret) <- "muRownamesFactor"
ret
}
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.