R/fbind.R

Defines functions fbind

Documented in fbind

# Put the definition of fbind() and only the definition of fbind() in R/fbind.R and save it.
# The file R/fbind.R should NOT contain any of the other top-level code we have recently executed,
# such as the definitions of factors a and b, library(devtools) or use_git()


# use roxygen2 to add this automatically - shift + option + cmd + R
#' Bind the two factors
#'
#' @param a first char vec
#' @param b second char vec
#'
#' @return factor
#' @export
#'
#' @examples
#' fbind(iris$Species[c(1, 51, 101)], PlantGrowth$group[c(1, 11, 21)])
fbind <- function(a, b) {
  factor(c(as.character(a), as.character(b)))
}


# then run document() (cmd + shift + D)
nicholas-camarda/telemetRy documentation built on Dec. 22, 2021, 2:11 a.m.