#' @title Bind two factors together
#' @description Bind two factors together.
#' Numeric values are not allowed. Characters are coerced to factors.
#' Look at the examples in the vignette for usage.
#'
#' @param a factor
#' @param b factor
#'
#' @return factor
#' @export
#' @examples
#' fbind(iris$Species[c(1,51,101)], PlantGrowth$group[c(1,11,21)])
fbind <- function(a,b) {
if(is.numeric(a) | is.numeric(b)){stop('One or more inputs are numeric!')}
factor(c(as.character(a), as.character(b)))
}
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.