Commit 33bb95a5 authored by houyun's avatar houyun
Browse files

set default prefix params to NULL

parent 165f14c7
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -347,7 +347,7 @@ check_env_ctrl <- function(env, env_ctrl, env_select) {
#' @examples
#' prefix_with(mtcars, "m")
#' @export
regex_select <- function(prefix = "",
regex_select <- function(prefix = NULL,
                         suffix = NULL,
                         regex = NULL,
                         ...,
@@ -362,6 +362,7 @@ regex_select <- function(prefix = "",
  } else {
    regex <- regex
  }

  function(data) {
    if (!is.data.frame(data)) {
      data <- as.data.frame(data)
+1 −1
Original line number Diff line number Diff line
@@ -8,7 +8,7 @@
\title{Subset columns using regular expression
Subset columns from a data frame if column names match the regular pattern.}
\usage{
regex_select(prefix = "", suffix = NULL, regex = NULL, ..., byrow = FALSE)
regex_select(prefix = NULL, suffix = NULL, regex = NULL, ..., byrow = FALSE)

prefix_with(data, chr = "", ..., byrow = FALSE)