R/subset_grep.R

Defines functions subset_grep

Documented in subset_grep

#' subset by grep
#' @param df the dataframe to subset
#' @param grepstring the namestring of the colomns to grab, greplstyle
#' @export
subset_grep =  function(df, grepstring)
{
  df[, which(grepl(grepstring, names(df)))]
}
mengluchu/food_envir documentation built on May 3, 2019, 1:34 p.m.