R/fbind.R

Defines functions fbind

Documented in fbind

#' Bind two factors
#' 
#' Creates a new factor from two existing factors, where the new factor's
#' levels are the union of the levels of the input factors
#' 
#' @param a factor
#' @param b factor
#' 
#' @return factor
#' @export
#' @examples
#' fbind(factor(letters[1:3]),factor(letters[26:24]))


fbind<-function(a,b){
  factor(c(as.character(a), as.character(b)))
}
chorscroft/myRPackage documentation built on Nov. 12, 2019, 9:44 p.m.