R/firstColumn.R

Defines functions firstColumn

Documented in firstColumn

#' Inital Function
#'
#' @param .data DataFrame or Tibble
firstColumn = function(.data){
  stopifnot(is.data.frame(.data))

  if(ncol(.data) == 0)
    stop("Could not select the first column of a dataframe with 0 columns")

  .data[,1, drop = F]
}
lefec/lfemisc documentation built on Nov. 4, 2019, 4:19 p.m.