R/TODO.r

Defines functions nativefac

Documented in nativefac

# Mon Apr 02 22:23:25 2018 ------------------------------
#' Transform numeric/character vector to factor with natively ordered levels
#'
#' @param x numeric or character vector
#'
#' @return
#'
nativefac <- function(x){
  factor(as.character(x), levels=unique(x))
}
yanxianUCSB/yxhelper documentation built on April 20, 2020, 4:09 p.m.