diff --git a/R/extract_column_names.R b/R/extract_column_names.R index a3d120d3f..b1cb54f35 100644 --- a/R/extract_column_names.R +++ b/R/extract_column_names.R @@ -19,15 +19,16 @@ #' - a vector of negative integers, giving the positions counting from the #' right (e.g., `-1` or `-1:-3`), #' - one of the following select-helpers: `starts_with()`, `ends_with()`, -#' `contains()`, a range using `:` or `regex("")`. `starts_with()`, +#' `contains()`, a range using `:`, or `regex()`. `starts_with()`, #' `ends_with()`, and `contains()` accept several patterns, e.g -#' `starts_with("Sep", "Petal")`. -#' - or a function testing for logical conditions, e.g. `is.numeric()` (or +#' `starts_with("Sep", "Petal")`. `regex()` can be used to define regular +#' expression patterns. +#' - a function testing for logical conditions, e.g. `is.numeric()` (or #' `is.numeric`), or any user-defined function that selects the variables #' for which the function returns `TRUE` (like: `foo <- function(x) mean(x) > 3`), #' - ranges specified via literal variable names, select-helpers (except #' `regex()`) and (user-defined) functions can be negated, i.e. return -#' non-matching elements, when prefixed with a `-`, e.g. `-ends_with("")`, +#' non-matching elements, when prefixed with a `-`, e.g. `-ends_with()`, #' `-is.numeric` or `-(Sepal.Width:Petal.Length)`. **Note:** Negation means #' that matches are _excluded_, and thus, the `exclude` argument can be #' used alternatively. For instance, `select=-ends_with("Length")` (with @@ -48,7 +49,7 @@ #' character string (or a variable containing a character string) and is not #' allowed to be one of the supported select-helpers or a character vector #' of length > 1. `regex = TRUE` is comparable to using one of the two -#' select-helpers, `select = contains("")` or `select = regex("")`, however, +#' select-helpers, `select = contains()` or `select = regex()`, however, #' since the select-helpers may not work when called from inside other #' functions (see 'Details'), this argument may be used as workaround. #' @param verbose Toggle warnings. @@ -131,7 +132,10 @@ #' numeric_mean_35 <- function(x) is.numeric(x) && mean(x, na.rm = TRUE) > 3.5 #' extract_column_names(iris, numeric_mean_35) #' -#' # find range of colum names by range, using character vector +#' # find column names, using range +#' extract_column_names(mtcars, c(cyl:hp, wt)) +#' +#' # find range of column names by range, using character vector #' extract_column_names(mtcars, c("cyl:hp", "wt")) #' #' # rename returned columns for "data_select()" diff --git a/man/adjust.Rd b/man/adjust.Rd index 48b321b8f..c47606ce0 100644 --- a/man/adjust.Rd +++ b/man/adjust.Rd @@ -53,15 +53,16 @@ character vector of variable names including ranges specified via \code{:} \item a vector of negative integers, giving the positions counting from the right (e.g., \code{-1} or \code{-1:-3}), \item one of the following select-helpers: \code{starts_with()}, \code{ends_with()}, -\code{contains()}, a range using \code{:} or \code{regex("")}. \code{starts_with()}, +\code{contains()}, a range using \code{:}, or \code{regex()}. \code{starts_with()}, \code{ends_with()}, and \code{contains()} accept several patterns, e.g -\code{starts_with("Sep", "Petal")}. -\item or a function testing for logical conditions, e.g. \code{is.numeric()} (or +\code{starts_with("Sep", "Petal")}. \code{regex()} can be used to define regular +expression patterns. +\item a function testing for logical conditions, e.g. \code{is.numeric()} (or \code{is.numeric}), or any user-defined function that selects the variables for which the function returns \code{TRUE} (like: \code{foo <- function(x) mean(x) > 3}), \item ranges specified via literal variable names, select-helpers (except \code{regex()}) and (user-defined) functions can be negated, i.e. return -non-matching elements, when prefixed with a \code{-}, e.g. \code{-ends_with("")}, +non-matching elements, when prefixed with a \code{-}, e.g. \code{-ends_with()}, \code{-is.numeric} or \code{-(Sepal.Width:Petal.Length)}. \strong{Note:} Negation means that matches are \emph{excluded}, and thus, the \code{exclude} argument can be used alternatively. For instance, \code{select=-ends_with("Length")} (with @@ -102,7 +103,7 @@ treated as regular expression. When \code{regex = TRUE}, select \emph{must} be a character string (or a variable containing a character string) and is not allowed to be one of the supported select-helpers or a character vector of length > 1. \code{regex = TRUE} is comparable to using one of the two -select-helpers, \code{select = contains("")} or \code{select = regex("")}, however, +select-helpers, \code{select = contains()} or \code{select = regex()}, however, since the select-helpers may not work when called from inside other functions (see 'Details'), this argument may be used as workaround.} diff --git a/man/assign_labels.Rd b/man/assign_labels.Rd index e6fd24252..574730e7b 100644 --- a/man/assign_labels.Rd +++ b/man/assign_labels.Rd @@ -48,15 +48,16 @@ character vector of variable names including ranges specified via \code{:} \item a vector of negative integers, giving the positions counting from the right (e.g., \code{-1} or \code{-1:-3}), \item one of the following select-helpers: \code{starts_with()}, \code{ends_with()}, -\code{contains()}, a range using \code{:} or \code{regex("")}. \code{starts_with()}, +\code{contains()}, a range using \code{:}, or \code{regex()}. \code{starts_with()}, \code{ends_with()}, and \code{contains()} accept several patterns, e.g -\code{starts_with("Sep", "Petal")}. -\item or a function testing for logical conditions, e.g. \code{is.numeric()} (or +\code{starts_with("Sep", "Petal")}. \code{regex()} can be used to define regular +expression patterns. +\item a function testing for logical conditions, e.g. \code{is.numeric()} (or \code{is.numeric}), or any user-defined function that selects the variables for which the function returns \code{TRUE} (like: \code{foo <- function(x) mean(x) > 3}), \item ranges specified via literal variable names, select-helpers (except \code{regex()}) and (user-defined) functions can be negated, i.e. return -non-matching elements, when prefixed with a \code{-}, e.g. \code{-ends_with("")}, +non-matching elements, when prefixed with a \code{-}, e.g. \code{-ends_with()}, \code{-is.numeric} or \code{-(Sepal.Width:Petal.Length)}. \strong{Note:} Negation means that matches are \emph{excluded}, and thus, the \code{exclude} argument can be used alternatively. For instance, \code{select=-ends_with("Length")} (with @@ -81,7 +82,7 @@ treated as regular expression. When \code{regex = TRUE}, select \emph{must} be a character string (or a variable containing a character string) and is not allowed to be one of the supported select-helpers or a character vector of length > 1. \code{regex = TRUE} is comparable to using one of the two -select-helpers, \code{select = contains("")} or \code{select = regex("")}, however, +select-helpers, \code{select = contains()} or \code{select = regex()}, however, since the select-helpers may not work when called from inside other functions (see 'Details'), this argument may be used as workaround.} diff --git a/man/categorize.Rd b/man/categorize.Rd index 90a5e12b7..0fed929de 100644 --- a/man/categorize.Rd +++ b/man/categorize.Rd @@ -99,15 +99,16 @@ character vector of variable names including ranges specified via \code{:} \item a vector of negative integers, giving the positions counting from the right (e.g., \code{-1} or \code{-1:-3}), \item one of the following select-helpers: \code{starts_with()}, \code{ends_with()}, -\code{contains()}, a range using \code{:} or \code{regex("")}. \code{starts_with()}, +\code{contains()}, a range using \code{:}, or \code{regex()}. \code{starts_with()}, \code{ends_with()}, and \code{contains()} accept several patterns, e.g -\code{starts_with("Sep", "Petal")}. -\item or a function testing for logical conditions, e.g. \code{is.numeric()} (or +\code{starts_with("Sep", "Petal")}. \code{regex()} can be used to define regular +expression patterns. +\item a function testing for logical conditions, e.g. \code{is.numeric()} (or \code{is.numeric}), or any user-defined function that selects the variables for which the function returns \code{TRUE} (like: \code{foo <- function(x) mean(x) > 3}), \item ranges specified via literal variable names, select-helpers (except \code{regex()}) and (user-defined) functions can be negated, i.e. return -non-matching elements, when prefixed with a \code{-}, e.g. \code{-ends_with("")}, +non-matching elements, when prefixed with a \code{-}, e.g. \code{-ends_with()}, \code{-is.numeric} or \code{-(Sepal.Width:Petal.Length)}. \strong{Note:} Negation means that matches are \emph{excluded}, and thus, the \code{exclude} argument can be used alternatively. For instance, \code{select=-ends_with("Length")} (with @@ -142,7 +143,7 @@ treated as regular expression. When \code{regex = TRUE}, select \emph{must} be a character string (or a variable containing a character string) and is not allowed to be one of the supported select-helpers or a character vector of length > 1. \code{regex = TRUE} is comparable to using one of the two -select-helpers, \code{select = contains("")} or \code{select = regex("")}, however, +select-helpers, \code{select = contains()} or \code{select = regex()}, however, since the select-helpers may not work when called from inside other functions (see 'Details'), this argument may be used as workaround.} } diff --git a/man/center.Rd b/man/center.Rd index 4774020ab..691f10839 100644 --- a/man/center.Rd +++ b/man/center.Rd @@ -82,15 +82,16 @@ character vector of variable names including ranges specified via \code{:} \item a vector of negative integers, giving the positions counting from the right (e.g., \code{-1} or \code{-1:-3}), \item one of the following select-helpers: \code{starts_with()}, \code{ends_with()}, -\code{contains()}, a range using \code{:} or \code{regex("")}. \code{starts_with()}, +\code{contains()}, a range using \code{:}, or \code{regex()}. \code{starts_with()}, \code{ends_with()}, and \code{contains()} accept several patterns, e.g -\code{starts_with("Sep", "Petal")}. -\item or a function testing for logical conditions, e.g. \code{is.numeric()} (or +\code{starts_with("Sep", "Petal")}. \code{regex()} can be used to define regular +expression patterns. +\item a function testing for logical conditions, e.g. \code{is.numeric()} (or \code{is.numeric}), or any user-defined function that selects the variables for which the function returns \code{TRUE} (like: \code{foo <- function(x) mean(x) > 3}), \item ranges specified via literal variable names, select-helpers (except \code{regex()}) and (user-defined) functions can be negated, i.e. return -non-matching elements, when prefixed with a \code{-}, e.g. \code{-ends_with("")}, +non-matching elements, when prefixed with a \code{-}, e.g. \code{-ends_with()}, \code{-is.numeric} or \code{-(Sepal.Width:Petal.Length)}. \strong{Note:} Negation means that matches are \emph{excluded}, and thus, the \code{exclude} argument can be used alternatively. For instance, \code{select=-ends_with("Length")} (with @@ -133,7 +134,7 @@ treated as regular expression. When \code{regex = TRUE}, select \emph{must} be a character string (or a variable containing a character string) and is not allowed to be one of the supported select-helpers or a character vector of length > 1. \code{regex = TRUE} is comparable to using one of the two -select-helpers, \code{select = contains("")} or \code{select = regex("")}, however, +select-helpers, \code{select = contains()} or \code{select = regex()}, however, since the select-helpers may not work when called from inside other functions (see 'Details'), this argument may be used as workaround.} } diff --git a/man/convert_na_to.Rd b/man/convert_na_to.Rd index 702e0eb2e..369e3937d 100644 --- a/man/convert_na_to.Rd +++ b/man/convert_na_to.Rd @@ -51,15 +51,16 @@ character vector of variable names including ranges specified via \code{:} \item a vector of negative integers, giving the positions counting from the right (e.g., \code{-1} or \code{-1:-3}), \item one of the following select-helpers: \code{starts_with()}, \code{ends_with()}, -\code{contains()}, a range using \code{:} or \code{regex("")}. \code{starts_with()}, +\code{contains()}, a range using \code{:}, or \code{regex()}. \code{starts_with()}, \code{ends_with()}, and \code{contains()} accept several patterns, e.g -\code{starts_with("Sep", "Petal")}. -\item or a function testing for logical conditions, e.g. \code{is.numeric()} (or +\code{starts_with("Sep", "Petal")}. \code{regex()} can be used to define regular +expression patterns. +\item a function testing for logical conditions, e.g. \code{is.numeric()} (or \code{is.numeric}), or any user-defined function that selects the variables for which the function returns \code{TRUE} (like: \code{foo <- function(x) mean(x) > 3}), \item ranges specified via literal variable names, select-helpers (except \code{regex()}) and (user-defined) functions can be negated, i.e. return -non-matching elements, when prefixed with a \code{-}, e.g. \code{-ends_with("")}, +non-matching elements, when prefixed with a \code{-}, e.g. \code{-ends_with()}, \code{-is.numeric} or \code{-(Sepal.Width:Petal.Length)}. \strong{Note:} Negation means that matches are \emph{excluded}, and thus, the \code{exclude} argument can be used alternatively. For instance, \code{select=-ends_with("Length")} (with @@ -90,7 +91,7 @@ treated as regular expression. When \code{regex = TRUE}, select \emph{must} be a character string (or a variable containing a character string) and is not allowed to be one of the supported select-helpers or a character vector of length > 1. \code{regex = TRUE} is comparable to using one of the two -select-helpers, \code{select = contains("")} or \code{select = regex("")}, however, +select-helpers, \code{select = contains()} or \code{select = regex()}, however, since the select-helpers may not work when called from inside other functions (see 'Details'), this argument may be used as workaround.} } diff --git a/man/convert_to_na.Rd b/man/convert_to_na.Rd index fe308d61e..f56fdd7da 100644 --- a/man/convert_to_na.Rd +++ b/man/convert_to_na.Rd @@ -54,15 +54,16 @@ character vector of variable names including ranges specified via \code{:} \item a vector of negative integers, giving the positions counting from the right (e.g., \code{-1} or \code{-1:-3}), \item one of the following select-helpers: \code{starts_with()}, \code{ends_with()}, -\code{contains()}, a range using \code{:} or \code{regex("")}. \code{starts_with()}, +\code{contains()}, a range using \code{:}, or \code{regex()}. \code{starts_with()}, \code{ends_with()}, and \code{contains()} accept several patterns, e.g -\code{starts_with("Sep", "Petal")}. -\item or a function testing for logical conditions, e.g. \code{is.numeric()} (or +\code{starts_with("Sep", "Petal")}. \code{regex()} can be used to define regular +expression patterns. +\item a function testing for logical conditions, e.g. \code{is.numeric()} (or \code{is.numeric}), or any user-defined function that selects the variables for which the function returns \code{TRUE} (like: \code{foo <- function(x) mean(x) > 3}), \item ranges specified via literal variable names, select-helpers (except \code{regex()}) and (user-defined) functions can be negated, i.e. return -non-matching elements, when prefixed with a \code{-}, e.g. \code{-ends_with("")}, +non-matching elements, when prefixed with a \code{-}, e.g. \code{-ends_with()}, \code{-is.numeric} or \code{-(Sepal.Width:Petal.Length)}. \strong{Note:} Negation means that matches are \emph{excluded}, and thus, the \code{exclude} argument can be used alternatively. For instance, \code{select=-ends_with("Length")} (with @@ -87,7 +88,7 @@ treated as regular expression. When \code{regex = TRUE}, select \emph{must} be a character string (or a variable containing a character string) and is not allowed to be one of the supported select-helpers or a character vector of length > 1. \code{regex = TRUE} is comparable to using one of the two -select-helpers, \code{select = contains("")} or \code{select = regex("")}, however, +select-helpers, \code{select = contains()} or \code{select = regex()}, however, since the select-helpers may not work when called from inside other functions (see 'Details'), this argument may be used as workaround.} } diff --git a/man/data_codebook.Rd b/man/data_codebook.Rd index d5a542be4..4fcddc1ff 100644 --- a/man/data_codebook.Rd +++ b/man/data_codebook.Rd @@ -44,15 +44,16 @@ character vector of variable names including ranges specified via \code{:} \item a vector of negative integers, giving the positions counting from the right (e.g., \code{-1} or \code{-1:-3}), \item one of the following select-helpers: \code{starts_with()}, \code{ends_with()}, -\code{contains()}, a range using \code{:} or \code{regex("")}. \code{starts_with()}, +\code{contains()}, a range using \code{:}, or \code{regex()}. \code{starts_with()}, \code{ends_with()}, and \code{contains()} accept several patterns, e.g -\code{starts_with("Sep", "Petal")}. -\item or a function testing for logical conditions, e.g. \code{is.numeric()} (or +\code{starts_with("Sep", "Petal")}. \code{regex()} can be used to define regular +expression patterns. +\item a function testing for logical conditions, e.g. \code{is.numeric()} (or \code{is.numeric}), or any user-defined function that selects the variables for which the function returns \code{TRUE} (like: \code{foo <- function(x) mean(x) > 3}), \item ranges specified via literal variable names, select-helpers (except \code{regex()}) and (user-defined) functions can be negated, i.e. return -non-matching elements, when prefixed with a \code{-}, e.g. \code{-ends_with("")}, +non-matching elements, when prefixed with a \code{-}, e.g. \code{-ends_with()}, \code{-is.numeric} or \code{-(Sepal.Width:Petal.Length)}. \strong{Note:} Negation means that matches are \emph{excluded}, and thus, the \code{exclude} argument can be used alternatively. For instance, \code{select=-ends_with("Length")} (with @@ -94,7 +95,7 @@ treated as regular expression. When \code{regex = TRUE}, select \emph{must} be a character string (or a variable containing a character string) and is not allowed to be one of the supported select-helpers or a character vector of length > 1. \code{regex = TRUE} is comparable to using one of the two -select-helpers, \code{select = contains("")} or \code{select = regex("")}, however, +select-helpers, \code{select = contains()} or \code{select = regex()}, however, since the select-helpers may not work when called from inside other functions (see 'Details'), this argument may be used as workaround.} diff --git a/man/data_duplicated.Rd b/man/data_duplicated.Rd index 88624c8c8..30d8a455d 100644 --- a/man/data_duplicated.Rd +++ b/man/data_duplicated.Rd @@ -30,15 +30,16 @@ character vector of variable names including ranges specified via \code{:} \item a vector of negative integers, giving the positions counting from the right (e.g., \code{-1} or \code{-1:-3}), \item one of the following select-helpers: \code{starts_with()}, \code{ends_with()}, -\code{contains()}, a range using \code{:} or \code{regex("")}. \code{starts_with()}, +\code{contains()}, a range using \code{:}, or \code{regex()}. \code{starts_with()}, \code{ends_with()}, and \code{contains()} accept several patterns, e.g -\code{starts_with("Sep", "Petal")}. -\item or a function testing for logical conditions, e.g. \code{is.numeric()} (or +\code{starts_with("Sep", "Petal")}. \code{regex()} can be used to define regular +expression patterns. +\item a function testing for logical conditions, e.g. \code{is.numeric()} (or \code{is.numeric}), or any user-defined function that selects the variables for which the function returns \code{TRUE} (like: \code{foo <- function(x) mean(x) > 3}), \item ranges specified via literal variable names, select-helpers (except \code{regex()}) and (user-defined) functions can be negated, i.e. return -non-matching elements, when prefixed with a \code{-}, e.g. \code{-ends_with("")}, +non-matching elements, when prefixed with a \code{-}, e.g. \code{-ends_with()}, \code{-is.numeric} or \code{-(Sepal.Width:Petal.Length)}. \strong{Note:} Negation means that matches are \emph{excluded}, and thus, the \code{exclude} argument can be used alternatively. For instance, \code{select=-ends_with("Length")} (with @@ -63,7 +64,7 @@ treated as regular expression. When \code{regex = TRUE}, select \emph{must} be a character string (or a variable containing a character string) and is not allowed to be one of the supported select-helpers or a character vector of length > 1. \code{regex = TRUE} is comparable to using one of the two -select-helpers, \code{select = contains("")} or \code{select = regex("")}, however, +select-helpers, \code{select = contains()} or \code{select = regex()}, however, since the select-helpers may not work when called from inside other functions (see 'Details'), this argument may be used as workaround.} diff --git a/man/data_extract.Rd b/man/data_extract.Rd index 0b544e710..91b5ee29a 100644 --- a/man/data_extract.Rd +++ b/man/data_extract.Rd @@ -37,15 +37,16 @@ character vector of variable names including ranges specified via \code{:} \item a vector of negative integers, giving the positions counting from the right (e.g., \code{-1} or \code{-1:-3}), \item one of the following select-helpers: \code{starts_with()}, \code{ends_with()}, -\code{contains()}, a range using \code{:} or \code{regex("")}. \code{starts_with()}, +\code{contains()}, a range using \code{:}, or \code{regex()}. \code{starts_with()}, \code{ends_with()}, and \code{contains()} accept several patterns, e.g -\code{starts_with("Sep", "Petal")}. -\item or a function testing for logical conditions, e.g. \code{is.numeric()} (or +\code{starts_with("Sep", "Petal")}. \code{regex()} can be used to define regular +expression patterns. +\item a function testing for logical conditions, e.g. \code{is.numeric()} (or \code{is.numeric}), or any user-defined function that selects the variables for which the function returns \code{TRUE} (like: \code{foo <- function(x) mean(x) > 3}), \item ranges specified via literal variable names, select-helpers (except \code{regex()}) and (user-defined) functions can be negated, i.e. return -non-matching elements, when prefixed with a \code{-}, e.g. \code{-ends_with("")}, +non-matching elements, when prefixed with a \code{-}, e.g. \code{-ends_with()}, \code{-is.numeric} or \code{-(Sepal.Width:Petal.Length)}. \strong{Note:} Negation means that matches are \emph{excluded}, and thus, the \code{exclude} argument can be used alternatively. For instance, \code{select=-ends_with("Length")} (with @@ -88,7 +89,7 @@ treated as regular expression. When \code{regex = TRUE}, select \emph{must} be a character string (or a variable containing a character string) and is not allowed to be one of the supported select-helpers or a character vector of length > 1. \code{regex = TRUE} is comparable to using one of the two -select-helpers, \code{select = contains("")} or \code{select = regex("")}, however, +select-helpers, \code{select = contains()} or \code{select = regex()}, however, since the select-helpers may not work when called from inside other functions (see 'Details'), this argument may be used as workaround.} diff --git a/man/data_group.Rd b/man/data_group.Rd index 9cb55de5d..c360f7b5e 100644 --- a/man/data_group.Rd +++ b/man/data_group.Rd @@ -34,15 +34,16 @@ character vector of variable names including ranges specified via \code{:} \item a vector of negative integers, giving the positions counting from the right (e.g., \code{-1} or \code{-1:-3}), \item one of the following select-helpers: \code{starts_with()}, \code{ends_with()}, -\code{contains()}, a range using \code{:} or \code{regex("")}. \code{starts_with()}, +\code{contains()}, a range using \code{:}, or \code{regex()}. \code{starts_with()}, \code{ends_with()}, and \code{contains()} accept several patterns, e.g -\code{starts_with("Sep", "Petal")}. -\item or a function testing for logical conditions, e.g. \code{is.numeric()} (or +\code{starts_with("Sep", "Petal")}. \code{regex()} can be used to define regular +expression patterns. +\item a function testing for logical conditions, e.g. \code{is.numeric()} (or \code{is.numeric}), or any user-defined function that selects the variables for which the function returns \code{TRUE} (like: \code{foo <- function(x) mean(x) > 3}), \item ranges specified via literal variable names, select-helpers (except \code{regex()}) and (user-defined) functions can be negated, i.e. return -non-matching elements, when prefixed with a \code{-}, e.g. \code{-ends_with("")}, +non-matching elements, when prefixed with a \code{-}, e.g. \code{-ends_with()}, \code{-is.numeric} or \code{-(Sepal.Width:Petal.Length)}. \strong{Note:} Negation means that matches are \emph{excluded}, and thus, the \code{exclude} argument can be used alternatively. For instance, \code{select=-ends_with("Length")} (with @@ -67,7 +68,7 @@ treated as regular expression. When \code{regex = TRUE}, select \emph{must} be a character string (or a variable containing a character string) and is not allowed to be one of the supported select-helpers or a character vector of length > 1. \code{regex = TRUE} is comparable to using one of the two -select-helpers, \code{select = contains("")} or \code{select = regex("")}, however, +select-helpers, \code{select = contains()} or \code{select = regex()}, however, since the select-helpers may not work when called from inside other functions (see 'Details'), this argument may be used as workaround.} diff --git a/man/data_peek.Rd b/man/data_peek.Rd index 9524c70ec..5d5e2e18e 100644 --- a/man/data_peek.Rd +++ b/man/data_peek.Rd @@ -37,15 +37,16 @@ character vector of variable names including ranges specified via \code{:} \item a vector of negative integers, giving the positions counting from the right (e.g., \code{-1} or \code{-1:-3}), \item one of the following select-helpers: \code{starts_with()}, \code{ends_with()}, -\code{contains()}, a range using \code{:} or \code{regex("")}. \code{starts_with()}, +\code{contains()}, a range using \code{:}, or \code{regex()}. \code{starts_with()}, \code{ends_with()}, and \code{contains()} accept several patterns, e.g -\code{starts_with("Sep", "Petal")}. -\item or a function testing for logical conditions, e.g. \code{is.numeric()} (or +\code{starts_with("Sep", "Petal")}. \code{regex()} can be used to define regular +expression patterns. +\item a function testing for logical conditions, e.g. \code{is.numeric()} (or \code{is.numeric}), or any user-defined function that selects the variables for which the function returns \code{TRUE} (like: \code{foo <- function(x) mean(x) > 3}), \item ranges specified via literal variable names, select-helpers (except \code{regex()}) and (user-defined) functions can be negated, i.e. return -non-matching elements, when prefixed with a \code{-}, e.g. \code{-ends_with("")}, +non-matching elements, when prefixed with a \code{-}, e.g. \code{-ends_with()}, \code{-is.numeric} or \code{-(Sepal.Width:Petal.Length)}. \strong{Note:} Negation means that matches are \emph{excluded}, and thus, the \code{exclude} argument can be used alternatively. For instance, \code{select=-ends_with("Length")} (with @@ -70,7 +71,7 @@ treated as regular expression. When \code{regex = TRUE}, select \emph{must} be a character string (or a variable containing a character string) and is not allowed to be one of the supported select-helpers or a character vector of length > 1. \code{regex = TRUE} is comparable to using one of the two -select-helpers, \code{select = contains("")} or \code{select = regex("")}, however, +select-helpers, \code{select = contains()} or \code{select = regex()}, however, since the select-helpers may not work when called from inside other functions (see 'Details'), this argument may be used as workaround.} diff --git a/man/data_relocate.Rd b/man/data_relocate.Rd index 8f360579d..5991691cb 100644 --- a/man/data_relocate.Rd +++ b/man/data_relocate.Rd @@ -54,15 +54,16 @@ character vector of variable names including ranges specified via \code{:} \item a vector of negative integers, giving the positions counting from the right (e.g., \code{-1} or \code{-1:-3}), \item one of the following select-helpers: \code{starts_with()}, \code{ends_with()}, -\code{contains()}, a range using \code{:} or \code{regex("")}. \code{starts_with()}, +\code{contains()}, a range using \code{:}, or \code{regex()}. \code{starts_with()}, \code{ends_with()}, and \code{contains()} accept several patterns, e.g -\code{starts_with("Sep", "Petal")}. -\item or a function testing for logical conditions, e.g. \code{is.numeric()} (or +\code{starts_with("Sep", "Petal")}. \code{regex()} can be used to define regular +expression patterns. +\item a function testing for logical conditions, e.g. \code{is.numeric()} (or \code{is.numeric}), or any user-defined function that selects the variables for which the function returns \code{TRUE} (like: \code{foo <- function(x) mean(x) > 3}), \item ranges specified via literal variable names, select-helpers (except \code{regex()}) and (user-defined) functions can be negated, i.e. return -non-matching elements, when prefixed with a \code{-}, e.g. \code{-ends_with("")}, +non-matching elements, when prefixed with a \code{-}, e.g. \code{-ends_with()}, \code{-is.numeric} or \code{-(Sepal.Width:Petal.Length)}. \strong{Note:} Negation means that matches are \emph{excluded}, and thus, the \code{exclude} argument can be used alternatively. For instance, \code{select=-ends_with("Length")} (with @@ -89,7 +90,7 @@ treated as regular expression. When \code{regex = TRUE}, select \emph{must} be a character string (or a variable containing a character string) and is not allowed to be one of the supported select-helpers or a character vector of length > 1. \code{regex = TRUE} is comparable to using one of the two -select-helpers, \code{select = contains("")} or \code{select = regex("")}, however, +select-helpers, \code{select = contains()} or \code{select = regex()}, however, since the select-helpers may not work when called from inside other functions (see 'Details'), this argument may be used as workaround.} diff --git a/man/data_rename.Rd b/man/data_rename.Rd index 2859c04d7..3fea0fac4 100644 --- a/man/data_rename.Rd +++ b/man/data_rename.Rd @@ -69,15 +69,16 @@ character vector of variable names including ranges specified via \code{:} \item a vector of negative integers, giving the positions counting from the right (e.g., \code{-1} or \code{-1:-3}), \item one of the following select-helpers: \code{starts_with()}, \code{ends_with()}, -\code{contains()}, a range using \code{:} or \code{regex("")}. \code{starts_with()}, +\code{contains()}, a range using \code{:}, or \code{regex()}. \code{starts_with()}, \code{ends_with()}, and \code{contains()} accept several patterns, e.g -\code{starts_with("Sep", "Petal")}. -\item or a function testing for logical conditions, e.g. \code{is.numeric()} (or +\code{starts_with("Sep", "Petal")}. \code{regex()} can be used to define regular +expression patterns. +\item a function testing for logical conditions, e.g. \code{is.numeric()} (or \code{is.numeric}), or any user-defined function that selects the variables for which the function returns \code{TRUE} (like: \code{foo <- function(x) mean(x) > 3}), \item ranges specified via literal variable names, select-helpers (except \code{regex()}) and (user-defined) functions can be negated, i.e. return -non-matching elements, when prefixed with a \code{-}, e.g. \code{-ends_with("")}, +non-matching elements, when prefixed with a \code{-}, e.g. \code{-ends_with()}, \code{-is.numeric} or \code{-(Sepal.Width:Petal.Length)}. \strong{Note:} Negation means that matches are \emph{excluded}, and thus, the \code{exclude} argument can be used alternatively. For instance, \code{select=-ends_with("Length")} (with @@ -102,7 +103,7 @@ treated as regular expression. When \code{regex = TRUE}, select \emph{must} be a character string (or a variable containing a character string) and is not allowed to be one of the supported select-helpers or a character vector of length > 1. \code{regex = TRUE} is comparable to using one of the two -select-helpers, \code{select = contains("")} or \code{select = regex("")}, however, +select-helpers, \code{select = contains()} or \code{select = regex()}, however, since the select-helpers may not work when called from inside other functions (see 'Details'), this argument may be used as workaround.} diff --git a/man/data_replicate.Rd b/man/data_replicate.Rd index 5a427d570..0be353c66 100644 --- a/man/data_replicate.Rd +++ b/man/data_replicate.Rd @@ -37,15 +37,16 @@ character vector of variable names including ranges specified via \code{:} \item a vector of negative integers, giving the positions counting from the right (e.g., \code{-1} or \code{-1:-3}), \item one of the following select-helpers: \code{starts_with()}, \code{ends_with()}, -\code{contains()}, a range using \code{:} or \code{regex("")}. \code{starts_with()}, +\code{contains()}, a range using \code{:}, or \code{regex()}. \code{starts_with()}, \code{ends_with()}, and \code{contains()} accept several patterns, e.g -\code{starts_with("Sep", "Petal")}. -\item or a function testing for logical conditions, e.g. \code{is.numeric()} (or +\code{starts_with("Sep", "Petal")}. \code{regex()} can be used to define regular +expression patterns. +\item a function testing for logical conditions, e.g. \code{is.numeric()} (or \code{is.numeric}), or any user-defined function that selects the variables for which the function returns \code{TRUE} (like: \code{foo <- function(x) mean(x) > 3}), \item ranges specified via literal variable names, select-helpers (except \code{regex()}) and (user-defined) functions can be negated, i.e. return -non-matching elements, when prefixed with a \code{-}, e.g. \code{-ends_with("")}, +non-matching elements, when prefixed with a \code{-}, e.g. \code{-ends_with()}, \code{-is.numeric} or \code{-(Sepal.Width:Petal.Length)}. \strong{Note:} Negation means that matches are \emph{excluded}, and thus, the \code{exclude} argument can be used alternatively. For instance, \code{select=-ends_with("Length")} (with @@ -76,7 +77,7 @@ treated as regular expression. When \code{regex = TRUE}, select \emph{must} be a character string (or a variable containing a character string) and is not allowed to be one of the supported select-helpers or a character vector of length > 1. \code{regex = TRUE} is comparable to using one of the two -select-helpers, \code{select = contains("")} or \code{select = regex("")}, however, +select-helpers, \code{select = contains()} or \code{select = regex()}, however, since the select-helpers may not work when called from inside other functions (see 'Details'), this argument may be used as workaround.} diff --git a/man/data_separate.Rd b/man/data_separate.Rd index 7c951f81c..b85b01916 100644 --- a/man/data_separate.Rd +++ b/man/data_separate.Rd @@ -40,15 +40,16 @@ character vector of variable names including ranges specified via \code{:} \item a vector of negative integers, giving the positions counting from the right (e.g., \code{-1} or \code{-1:-3}), \item one of the following select-helpers: \code{starts_with()}, \code{ends_with()}, -\code{contains()}, a range using \code{:} or \code{regex("")}. \code{starts_with()}, +\code{contains()}, a range using \code{:}, or \code{regex()}. \code{starts_with()}, \code{ends_with()}, and \code{contains()} accept several patterns, e.g -\code{starts_with("Sep", "Petal")}. -\item or a function testing for logical conditions, e.g. \code{is.numeric()} (or +\code{starts_with("Sep", "Petal")}. \code{regex()} can be used to define regular +expression patterns. +\item a function testing for logical conditions, e.g. \code{is.numeric()} (or \code{is.numeric}), or any user-defined function that selects the variables for which the function returns \code{TRUE} (like: \code{foo <- function(x) mean(x) > 3}), \item ranges specified via literal variable names, select-helpers (except \code{regex()}) and (user-defined) functions can be negated, i.e. return -non-matching elements, when prefixed with a \code{-}, e.g. \code{-ends_with("")}, +non-matching elements, when prefixed with a \code{-}, e.g. \code{-ends_with()}, \code{-is.numeric} or \code{-(Sepal.Width:Petal.Length)}. \strong{Note:} Negation means that matches are \emph{excluded}, and thus, the \code{exclude} argument can be used alternatively. For instance, \code{select=-ends_with("Length")} (with @@ -120,7 +121,7 @@ treated as regular expression. When \code{regex = TRUE}, select \emph{must} be a character string (or a variable containing a character string) and is not allowed to be one of the supported select-helpers or a character vector of length > 1. \code{regex = TRUE} is comparable to using one of the two -select-helpers, \code{select = contains("")} or \code{select = regex("")}, however, +select-helpers, \code{select = contains()} or \code{select = regex()}, however, since the select-helpers may not work when called from inside other functions (see 'Details'), this argument may be used as workaround.} diff --git a/man/data_tabulate.Rd b/man/data_tabulate.Rd index b28a26ede..ac91ead65 100644 --- a/man/data_tabulate.Rd +++ b/man/data_tabulate.Rd @@ -89,15 +89,16 @@ character vector of variable names including ranges specified via \code{:} \item a vector of negative integers, giving the positions counting from the right (e.g., \code{-1} or \code{-1:-3}), \item one of the following select-helpers: \code{starts_with()}, \code{ends_with()}, -\code{contains()}, a range using \code{:} or \code{regex("")}. \code{starts_with()}, +\code{contains()}, a range using \code{:}, or \code{regex()}. \code{starts_with()}, \code{ends_with()}, and \code{contains()} accept several patterns, e.g -\code{starts_with("Sep", "Petal")}. -\item or a function testing for logical conditions, e.g. \code{is.numeric()} (or +\code{starts_with("Sep", "Petal")}. \code{regex()} can be used to define regular +expression patterns. +\item a function testing for logical conditions, e.g. \code{is.numeric()} (or \code{is.numeric}), or any user-defined function that selects the variables for which the function returns \code{TRUE} (like: \code{foo <- function(x) mean(x) > 3}), \item ranges specified via literal variable names, select-helpers (except \code{regex()}) and (user-defined) functions can be negated, i.e. return -non-matching elements, when prefixed with a \code{-}, e.g. \code{-ends_with("")}, +non-matching elements, when prefixed with a \code{-}, e.g. \code{-ends_with()}, \code{-is.numeric} or \code{-(Sepal.Width:Petal.Length)}. \strong{Note:} Negation means that matches are \emph{excluded}, and thus, the \code{exclude} argument can be used alternatively. For instance, \code{select=-ends_with("Length")} (with @@ -122,7 +123,7 @@ treated as regular expression. When \code{regex = TRUE}, select \emph{must} be a character string (or a variable containing a character string) and is not allowed to be one of the supported select-helpers or a character vector of length > 1. \code{regex = TRUE} is comparable to using one of the two -select-helpers, \code{select = contains("")} or \code{select = regex("")}, however, +select-helpers, \code{select = contains()} or \code{select = regex()}, however, since the select-helpers may not work when called from inside other functions (see 'Details'), this argument may be used as workaround.} diff --git a/man/data_to_long.Rd b/man/data_to_long.Rd index 1c77f764c..3e587c049 100644 --- a/man/data_to_long.Rd +++ b/man/data_to_long.Rd @@ -55,15 +55,16 @@ character vector of variable names including ranges specified via \code{:} \item a vector of negative integers, giving the positions counting from the right (e.g., \code{-1} or \code{-1:-3}), \item one of the following select-helpers: \code{starts_with()}, \code{ends_with()}, -\code{contains()}, a range using \code{:} or \code{regex("")}. \code{starts_with()}, +\code{contains()}, a range using \code{:}, or \code{regex()}. \code{starts_with()}, \code{ends_with()}, and \code{contains()} accept several patterns, e.g -\code{starts_with("Sep", "Petal")}. -\item or a function testing for logical conditions, e.g. \code{is.numeric()} (or +\code{starts_with("Sep", "Petal")}. \code{regex()} can be used to define regular +expression patterns. +\item a function testing for logical conditions, e.g. \code{is.numeric()} (or \code{is.numeric}), or any user-defined function that selects the variables for which the function returns \code{TRUE} (like: \code{foo <- function(x) mean(x) > 3}), \item ranges specified via literal variable names, select-helpers (except \code{regex()}) and (user-defined) functions can be negated, i.e. return -non-matching elements, when prefixed with a \code{-}, e.g. \code{-ends_with("")}, +non-matching elements, when prefixed with a \code{-}, e.g. \code{-ends_with()}, \code{-is.numeric} or \code{-(Sepal.Width:Petal.Length)}. \strong{Note:} Negation means that matches are \emph{excluded}, and thus, the \code{exclude} argument can be used alternatively. For instance, \code{select=-ends_with("Length")} (with @@ -109,7 +110,7 @@ treated as regular expression. When \code{regex = TRUE}, select \emph{must} be a character string (or a variable containing a character string) and is not allowed to be one of the supported select-helpers or a character vector of length > 1. \code{regex = TRUE} is comparable to using one of the two -select-helpers, \code{select = contains("")} or \code{select = regex("")}, however, +select-helpers, \code{select = contains()} or \code{select = regex()}, however, since the select-helpers may not work when called from inside other functions (see 'Details'), this argument may be used as workaround.} diff --git a/man/data_unique.Rd b/man/data_unique.Rd index a0a70b92a..e0911901d 100644 --- a/man/data_unique.Rd +++ b/man/data_unique.Rd @@ -31,15 +31,16 @@ character vector of variable names including ranges specified via \code{:} \item a vector of negative integers, giving the positions counting from the right (e.g., \code{-1} or \code{-1:-3}), \item one of the following select-helpers: \code{starts_with()}, \code{ends_with()}, -\code{contains()}, a range using \code{:} or \code{regex("")}. \code{starts_with()}, +\code{contains()}, a range using \code{:}, or \code{regex()}. \code{starts_with()}, \code{ends_with()}, and \code{contains()} accept several patterns, e.g -\code{starts_with("Sep", "Petal")}. -\item or a function testing for logical conditions, e.g. \code{is.numeric()} (or +\code{starts_with("Sep", "Petal")}. \code{regex()} can be used to define regular +expression patterns. +\item a function testing for logical conditions, e.g. \code{is.numeric()} (or \code{is.numeric}), or any user-defined function that selects the variables for which the function returns \code{TRUE} (like: \code{foo <- function(x) mean(x) > 3}), \item ranges specified via literal variable names, select-helpers (except \code{regex()}) and (user-defined) functions can be negated, i.e. return -non-matching elements, when prefixed with a \code{-}, e.g. \code{-ends_with("")}, +non-matching elements, when prefixed with a \code{-}, e.g. \code{-ends_with()}, \code{-is.numeric} or \code{-(Sepal.Width:Petal.Length)}. \strong{Note:} Negation means that matches are \emph{excluded}, and thus, the \code{exclude} argument can be used alternatively. For instance, \code{select=-ends_with("Length")} (with @@ -67,7 +68,7 @@ treated as regular expression. When \code{regex = TRUE}, select \emph{must} be a character string (or a variable containing a character string) and is not allowed to be one of the supported select-helpers or a character vector of length > 1. \code{regex = TRUE} is comparable to using one of the two -select-helpers, \code{select = contains("")} or \code{select = regex("")}, however, +select-helpers, \code{select = contains()} or \code{select = regex()}, however, since the select-helpers may not work when called from inside other functions (see 'Details'), this argument may be used as workaround.} diff --git a/man/data_unite.Rd b/man/data_unite.Rd index 369fd33d8..c9893933e 100644 --- a/man/data_unite.Rd +++ b/man/data_unite.Rd @@ -37,15 +37,16 @@ character vector of variable names including ranges specified via \code{:} \item a vector of negative integers, giving the positions counting from the right (e.g., \code{-1} or \code{-1:-3}), \item one of the following select-helpers: \code{starts_with()}, \code{ends_with()}, -\code{contains()}, a range using \code{:} or \code{regex("")}. \code{starts_with()}, +\code{contains()}, a range using \code{:}, or \code{regex()}. \code{starts_with()}, \code{ends_with()}, and \code{contains()} accept several patterns, e.g -\code{starts_with("Sep", "Petal")}. -\item or a function testing for logical conditions, e.g. \code{is.numeric()} (or +\code{starts_with("Sep", "Petal")}. \code{regex()} can be used to define regular +expression patterns. +\item a function testing for logical conditions, e.g. \code{is.numeric()} (or \code{is.numeric}), or any user-defined function that selects the variables for which the function returns \code{TRUE} (like: \code{foo <- function(x) mean(x) > 3}), \item ranges specified via literal variable names, select-helpers (except \code{regex()}) and (user-defined) functions can be negated, i.e. return -non-matching elements, when prefixed with a \code{-}, e.g. \code{-ends_with("")}, +non-matching elements, when prefixed with a \code{-}, e.g. \code{-ends_with()}, \code{-is.numeric} or \code{-(Sepal.Width:Petal.Length)}. \strong{Note:} Negation means that matches are \emph{excluded}, and thus, the \code{exclude} argument can be used alternatively. For instance, \code{select=-ends_with("Length")} (with @@ -82,7 +83,7 @@ treated as regular expression. When \code{regex = TRUE}, select \emph{must} be a character string (or a variable containing a character string) and is not allowed to be one of the supported select-helpers or a character vector of length > 1. \code{regex = TRUE} is comparable to using one of the two -select-helpers, \code{select = contains("")} or \code{select = regex("")}, however, +select-helpers, \code{select = contains()} or \code{select = regex()}, however, since the select-helpers may not work when called from inside other functions (see 'Details'), this argument may be used as workaround.} diff --git a/man/describe_distribution.Rd b/man/describe_distribution.Rd index 80b69e115..4837834ac 100644 --- a/man/describe_distribution.Rd +++ b/man/describe_distribution.Rd @@ -96,15 +96,16 @@ character vector of variable names including ranges specified via \code{:} \item a vector of negative integers, giving the positions counting from the right (e.g., \code{-1} or \code{-1:-3}), \item one of the following select-helpers: \code{starts_with()}, \code{ends_with()}, -\code{contains()}, a range using \code{:} or \code{regex("")}. \code{starts_with()}, +\code{contains()}, a range using \code{:}, or \code{regex()}. \code{starts_with()}, \code{ends_with()}, and \code{contains()} accept several patterns, e.g -\code{starts_with("Sep", "Petal")}. -\item or a function testing for logical conditions, e.g. \code{is.numeric()} (or +\code{starts_with("Sep", "Petal")}. \code{regex()} can be used to define regular +expression patterns. +\item a function testing for logical conditions, e.g. \code{is.numeric()} (or \code{is.numeric}), or any user-defined function that selects the variables for which the function returns \code{TRUE} (like: \code{foo <- function(x) mean(x) > 3}), \item ranges specified via literal variable names, select-helpers (except \code{regex()}) and (user-defined) functions can be negated, i.e. return -non-matching elements, when prefixed with a \code{-}, e.g. \code{-ends_with("")}, +non-matching elements, when prefixed with a \code{-}, e.g. \code{-ends_with()}, \code{-is.numeric} or \code{-(Sepal.Width:Petal.Length)}. \strong{Note:} Negation means that matches are \emph{excluded}, and thus, the \code{exclude} argument can be used alternatively. For instance, \code{select=-ends_with("Length")} (with @@ -133,7 +134,7 @@ treated as regular expression. When \code{regex = TRUE}, select \emph{must} be a character string (or a variable containing a character string) and is not allowed to be one of the supported select-helpers or a character vector of length > 1. \code{regex = TRUE} is comparable to using one of the two -select-helpers, \code{select = contains("")} or \code{select = regex("")}, however, +select-helpers, \code{select = contains()} or \code{select = regex()}, however, since the select-helpers may not work when called from inside other functions (see 'Details'), this argument may be used as workaround.} } diff --git a/man/extract_column_names.Rd b/man/extract_column_names.Rd index bb0f9ada8..fe334e22f 100644 --- a/man/extract_column_names.Rd +++ b/man/extract_column_names.Rd @@ -53,15 +53,16 @@ character vector of variable names including ranges specified via \code{:} \item a vector of negative integers, giving the positions counting from the right (e.g., \code{-1} or \code{-1:-3}), \item one of the following select-helpers: \code{starts_with()}, \code{ends_with()}, -\code{contains()}, a range using \code{:} or \code{regex("")}. \code{starts_with()}, +\code{contains()}, a range using \code{:}, or \code{regex()}. \code{starts_with()}, \code{ends_with()}, and \code{contains()} accept several patterns, e.g -\code{starts_with("Sep", "Petal")}. -\item or a function testing for logical conditions, e.g. \code{is.numeric()} (or +\code{starts_with("Sep", "Petal")}. \code{regex()} can be used to define regular +expression patterns. +\item a function testing for logical conditions, e.g. \code{is.numeric()} (or \code{is.numeric}), or any user-defined function that selects the variables for which the function returns \code{TRUE} (like: \code{foo <- function(x) mean(x) > 3}), \item ranges specified via literal variable names, select-helpers (except \code{regex()}) and (user-defined) functions can be negated, i.e. return -non-matching elements, when prefixed with a \code{-}, e.g. \code{-ends_with("")}, +non-matching elements, when prefixed with a \code{-}, e.g. \code{-ends_with()}, \code{-is.numeric} or \code{-(Sepal.Width:Petal.Length)}. \strong{Note:} Negation means that matches are \emph{excluded}, and thus, the \code{exclude} argument can be used alternatively. For instance, \code{select=-ends_with("Length")} (with @@ -86,7 +87,7 @@ treated as regular expression. When \code{regex = TRUE}, select \emph{must} be a character string (or a variable containing a character string) and is not allowed to be one of the supported select-helpers or a character vector of length > 1. \code{regex = TRUE} is comparable to using one of the two -select-helpers, \code{select = contains("")} or \code{select = regex("")}, however, +select-helpers, \code{select = contains()} or \code{select = regex()}, however, since the select-helpers may not work when called from inside other functions (see 'Details'), this argument may be used as workaround.} @@ -167,7 +168,10 @@ extract_column_names(iris, starts_with("Sepal"), exclude = contains("Width")) numeric_mean_35 <- function(x) is.numeric(x) && mean(x, na.rm = TRUE) > 3.5 extract_column_names(iris, numeric_mean_35) -# find range of colum names by range, using character vector +# find column names, using range +extract_column_names(mtcars, c(cyl:hp, wt)) + +# find range of column names by range, using character vector extract_column_names(mtcars, c("cyl:hp", "wt")) # rename returned columns for "data_select()" diff --git a/man/labels_to_levels.Rd b/man/labels_to_levels.Rd index 163eb0eaa..c75e2f537 100644 --- a/man/labels_to_levels.Rd +++ b/man/labels_to_levels.Rd @@ -43,15 +43,16 @@ character vector of variable names including ranges specified via \code{:} \item a vector of negative integers, giving the positions counting from the right (e.g., \code{-1} or \code{-1:-3}), \item one of the following select-helpers: \code{starts_with()}, \code{ends_with()}, -\code{contains()}, a range using \code{:} or \code{regex("")}. \code{starts_with()}, +\code{contains()}, a range using \code{:}, or \code{regex()}. \code{starts_with()}, \code{ends_with()}, and \code{contains()} accept several patterns, e.g -\code{starts_with("Sep", "Petal")}. -\item or a function testing for logical conditions, e.g. \code{is.numeric()} (or +\code{starts_with("Sep", "Petal")}. \code{regex()} can be used to define regular +expression patterns. +\item a function testing for logical conditions, e.g. \code{is.numeric()} (or \code{is.numeric}), or any user-defined function that selects the variables for which the function returns \code{TRUE} (like: \code{foo <- function(x) mean(x) > 3}), \item ranges specified via literal variable names, select-helpers (except \code{regex()}) and (user-defined) functions can be negated, i.e. return -non-matching elements, when prefixed with a \code{-}, e.g. \code{-ends_with("")}, +non-matching elements, when prefixed with a \code{-}, e.g. \code{-ends_with()}, \code{-is.numeric} or \code{-(Sepal.Width:Petal.Length)}. \strong{Note:} Negation means that matches are \emph{excluded}, and thus, the \code{exclude} argument can be used alternatively. For instance, \code{select=-ends_with("Length")} (with @@ -86,7 +87,7 @@ treated as regular expression. When \code{regex = TRUE}, select \emph{must} be a character string (or a variable containing a character string) and is not allowed to be one of the supported select-helpers or a character vector of length > 1. \code{regex = TRUE} is comparable to using one of the two -select-helpers, \code{select = contains("")} or \code{select = regex("")}, however, +select-helpers, \code{select = contains()} or \code{select = regex()}, however, since the select-helpers may not work when called from inside other functions (see 'Details'), this argument may be used as workaround.} } diff --git a/man/means_by_group.Rd b/man/means_by_group.Rd index 6c06ac3b1..8407263b7 100644 --- a/man/means_by_group.Rd +++ b/man/means_by_group.Rd @@ -61,15 +61,16 @@ character vector of variable names including ranges specified via \code{:} \item a vector of negative integers, giving the positions counting from the right (e.g., \code{-1} or \code{-1:-3}), \item one of the following select-helpers: \code{starts_with()}, \code{ends_with()}, -\code{contains()}, a range using \code{:} or \code{regex("")}. \code{starts_with()}, +\code{contains()}, a range using \code{:}, or \code{regex()}. \code{starts_with()}, \code{ends_with()}, and \code{contains()} accept several patterns, e.g -\code{starts_with("Sep", "Petal")}. -\item or a function testing for logical conditions, e.g. \code{is.numeric()} (or +\code{starts_with("Sep", "Petal")}. \code{regex()} can be used to define regular +expression patterns. +\item a function testing for logical conditions, e.g. \code{is.numeric()} (or \code{is.numeric}), or any user-defined function that selects the variables for which the function returns \code{TRUE} (like: \code{foo <- function(x) mean(x) > 3}), \item ranges specified via literal variable names, select-helpers (except \code{regex()}) and (user-defined) functions can be negated, i.e. return -non-matching elements, when prefixed with a \code{-}, e.g. \code{-ends_with("")}, +non-matching elements, when prefixed with a \code{-}, e.g. \code{-ends_with()}, \code{-is.numeric} or \code{-(Sepal.Width:Petal.Length)}. \strong{Note:} Negation means that matches are \emph{excluded}, and thus, the \code{exclude} argument can be used alternatively. For instance, \code{select=-ends_with("Length")} (with @@ -94,7 +95,7 @@ treated as regular expression. When \code{regex = TRUE}, select \emph{must} be a character string (or a variable containing a character string) and is not allowed to be one of the supported select-helpers or a character vector of length > 1. \code{regex = TRUE} is comparable to using one of the two -select-helpers, \code{select = contains("")} or \code{select = regex("")}, however, +select-helpers, \code{select = contains()} or \code{select = regex()}, however, since the select-helpers may not work when called from inside other functions (see 'Details'), this argument may be used as workaround.} diff --git a/man/normalize.Rd b/man/normalize.Rd index c325e98fe..ecb3a2706 100644 --- a/man/normalize.Rd +++ b/man/normalize.Rd @@ -81,15 +81,16 @@ character vector of variable names including ranges specified via \code{:} \item a vector of negative integers, giving the positions counting from the right (e.g., \code{-1} or \code{-1:-3}), \item one of the following select-helpers: \code{starts_with()}, \code{ends_with()}, -\code{contains()}, a range using \code{:} or \code{regex("")}. \code{starts_with()}, +\code{contains()}, a range using \code{:}, or \code{regex()}. \code{starts_with()}, \code{ends_with()}, and \code{contains()} accept several patterns, e.g -\code{starts_with("Sep", "Petal")}. -\item or a function testing for logical conditions, e.g. \code{is.numeric()} (or +\code{starts_with("Sep", "Petal")}. \code{regex()} can be used to define regular +expression patterns. +\item a function testing for logical conditions, e.g. \code{is.numeric()} (or \code{is.numeric}), or any user-defined function that selects the variables for which the function returns \code{TRUE} (like: \code{foo <- function(x) mean(x) > 3}), \item ranges specified via literal variable names, select-helpers (except \code{regex()}) and (user-defined) functions can be negated, i.e. return -non-matching elements, when prefixed with a \code{-}, e.g. \code{-ends_with("")}, +non-matching elements, when prefixed with a \code{-}, e.g. \code{-ends_with()}, \code{-is.numeric} or \code{-(Sepal.Width:Petal.Length)}. \strong{Note:} Negation means that matches are \emph{excluded}, and thus, the \code{exclude} argument can be used alternatively. For instance, \code{select=-ends_with("Length")} (with @@ -121,7 +122,7 @@ treated as regular expression. When \code{regex = TRUE}, select \emph{must} be a character string (or a variable containing a character string) and is not allowed to be one of the supported select-helpers or a character vector of length > 1. \code{regex = TRUE} is comparable to using one of the two -select-helpers, \code{select = contains("")} or \code{select = regex("")}, however, +select-helpers, \code{select = contains()} or \code{select = regex()}, however, since the select-helpers may not work when called from inside other functions (see 'Details'), this argument may be used as workaround.} } diff --git a/man/ranktransform.Rd b/man/ranktransform.Rd index 7046db2b5..44b0052c4 100644 --- a/man/ranktransform.Rd +++ b/man/ranktransform.Rd @@ -49,15 +49,16 @@ character vector of variable names including ranges specified via \code{:} \item a vector of negative integers, giving the positions counting from the right (e.g., \code{-1} or \code{-1:-3}), \item one of the following select-helpers: \code{starts_with()}, \code{ends_with()}, -\code{contains()}, a range using \code{:} or \code{regex("")}. \code{starts_with()}, +\code{contains()}, a range using \code{:}, or \code{regex()}. \code{starts_with()}, \code{ends_with()}, and \code{contains()} accept several patterns, e.g -\code{starts_with("Sep", "Petal")}. -\item or a function testing for logical conditions, e.g. \code{is.numeric()} (or +\code{starts_with("Sep", "Petal")}. \code{regex()} can be used to define regular +expression patterns. +\item a function testing for logical conditions, e.g. \code{is.numeric()} (or \code{is.numeric}), or any user-defined function that selects the variables for which the function returns \code{TRUE} (like: \code{foo <- function(x) mean(x) > 3}), \item ranges specified via literal variable names, select-helpers (except \code{regex()}) and (user-defined) functions can be negated, i.e. return -non-matching elements, when prefixed with a \code{-}, e.g. \code{-ends_with("")}, +non-matching elements, when prefixed with a \code{-}, e.g. \code{-ends_with()}, \code{-is.numeric} or \code{-(Sepal.Width:Petal.Length)}. \strong{Note:} Negation means that matches are \emph{excluded}, and thus, the \code{exclude} argument can be used alternatively. For instance, \code{select=-ends_with("Length")} (with @@ -82,7 +83,7 @@ treated as regular expression. When \code{regex = TRUE}, select \emph{must} be a character string (or a variable containing a character string) and is not allowed to be one of the supported select-helpers or a character vector of length > 1. \code{regex = TRUE} is comparable to using one of the two -select-helpers, \code{select = contains("")} or \code{select = regex("")}, however, +select-helpers, \code{select = contains()} or \code{select = regex()}, however, since the select-helpers may not work when called from inside other functions (see 'Details'), this argument may be used as workaround.} } diff --git a/man/recode_values.Rd b/man/recode_values.Rd index 66b7c6e32..11f9cfadc 100644 --- a/man/recode_values.Rd +++ b/man/recode_values.Rd @@ -70,15 +70,16 @@ character vector of variable names including ranges specified via \code{:} \item a vector of negative integers, giving the positions counting from the right (e.g., \code{-1} or \code{-1:-3}), \item one of the following select-helpers: \code{starts_with()}, \code{ends_with()}, -\code{contains()}, a range using \code{:} or \code{regex("")}. \code{starts_with()}, +\code{contains()}, a range using \code{:}, or \code{regex()}. \code{starts_with()}, \code{ends_with()}, and \code{contains()} accept several patterns, e.g -\code{starts_with("Sep", "Petal")}. -\item or a function testing for logical conditions, e.g. \code{is.numeric()} (or +\code{starts_with("Sep", "Petal")}. \code{regex()} can be used to define regular +expression patterns. +\item a function testing for logical conditions, e.g. \code{is.numeric()} (or \code{is.numeric}), or any user-defined function that selects the variables for which the function returns \code{TRUE} (like: \code{foo <- function(x) mean(x) > 3}), \item ranges specified via literal variable names, select-helpers (except \code{regex()}) and (user-defined) functions can be negated, i.e. return -non-matching elements, when prefixed with a \code{-}, e.g. \code{-ends_with("")}, +non-matching elements, when prefixed with a \code{-}, e.g. \code{-ends_with()}, \code{-is.numeric} or \code{-(Sepal.Width:Petal.Length)}. \strong{Note:} Negation means that matches are \emph{excluded}, and thus, the \code{exclude} argument can be used alternatively. For instance, \code{select=-ends_with("Length")} (with @@ -113,7 +114,7 @@ treated as regular expression. When \code{regex = TRUE}, select \emph{must} be a character string (or a variable containing a character string) and is not allowed to be one of the supported select-helpers or a character vector of length > 1. \code{regex = TRUE} is comparable to using one of the two -select-helpers, \code{select = contains("")} or \code{select = regex("")}, however, +select-helpers, \code{select = contains()} or \code{select = regex()}, however, since the select-helpers may not work when called from inside other functions (see 'Details'), this argument may be used as workaround.} } diff --git a/man/rescale.Rd b/man/rescale.Rd index 490964777..8d6025a8d 100644 --- a/man/rescale.Rd +++ b/man/rescale.Rd @@ -77,15 +77,16 @@ character vector of variable names including ranges specified via \code{:} \item a vector of negative integers, giving the positions counting from the right (e.g., \code{-1} or \code{-1:-3}), \item one of the following select-helpers: \code{starts_with()}, \code{ends_with()}, -\code{contains()}, a range using \code{:} or \code{regex("")}. \code{starts_with()}, +\code{contains()}, a range using \code{:}, or \code{regex()}. \code{starts_with()}, \code{ends_with()}, and \code{contains()} accept several patterns, e.g -\code{starts_with("Sep", "Petal")}. -\item or a function testing for logical conditions, e.g. \code{is.numeric()} (or +\code{starts_with("Sep", "Petal")}. \code{regex()} can be used to define regular +expression patterns. +\item a function testing for logical conditions, e.g. \code{is.numeric()} (or \code{is.numeric}), or any user-defined function that selects the variables for which the function returns \code{TRUE} (like: \code{foo <- function(x) mean(x) > 3}), \item ranges specified via literal variable names, select-helpers (except \code{regex()}) and (user-defined) functions can be negated, i.e. return -non-matching elements, when prefixed with a \code{-}, e.g. \code{-ends_with("")}, +non-matching elements, when prefixed with a \code{-}, e.g. \code{-ends_with()}, \code{-is.numeric} or \code{-(Sepal.Width:Petal.Length)}. \strong{Note:} Negation means that matches are \emph{excluded}, and thus, the \code{exclude} argument can be used alternatively. For instance, \code{select=-ends_with("Length")} (with @@ -120,7 +121,7 @@ treated as regular expression. When \code{regex = TRUE}, select \emph{must} be a character string (or a variable containing a character string) and is not allowed to be one of the supported select-helpers or a character vector of length > 1. \code{regex = TRUE} is comparable to using one of the two -select-helpers, \code{select = contains("")} or \code{select = regex("")}, however, +select-helpers, \code{select = contains()} or \code{select = regex()}, however, since the select-helpers may not work when called from inside other functions (see 'Details'), this argument may be used as workaround.} } diff --git a/man/reverse.Rd b/man/reverse.Rd index 5767908ff..0f33154a4 100644 --- a/man/reverse.Rd +++ b/man/reverse.Rd @@ -55,15 +55,16 @@ character vector of variable names including ranges specified via \code{:} \item a vector of negative integers, giving the positions counting from the right (e.g., \code{-1} or \code{-1:-3}), \item one of the following select-helpers: \code{starts_with()}, \code{ends_with()}, -\code{contains()}, a range using \code{:} or \code{regex("")}. \code{starts_with()}, +\code{contains()}, a range using \code{:}, or \code{regex()}. \code{starts_with()}, \code{ends_with()}, and \code{contains()} accept several patterns, e.g -\code{starts_with("Sep", "Petal")}. -\item or a function testing for logical conditions, e.g. \code{is.numeric()} (or +\code{starts_with("Sep", "Petal")}. \code{regex()} can be used to define regular +expression patterns. +\item a function testing for logical conditions, e.g. \code{is.numeric()} (or \code{is.numeric}), or any user-defined function that selects the variables for which the function returns \code{TRUE} (like: \code{foo <- function(x) mean(x) > 3}), \item ranges specified via literal variable names, select-helpers (except \code{regex()}) and (user-defined) functions can be negated, i.e. return -non-matching elements, when prefixed with a \code{-}, e.g. \code{-ends_with("")}, +non-matching elements, when prefixed with a \code{-}, e.g. \code{-ends_with()}, \code{-is.numeric} or \code{-(Sepal.Width:Petal.Length)}. \strong{Note:} Negation means that matches are \emph{excluded}, and thus, the \code{exclude} argument can be used alternatively. For instance, \code{select=-ends_with("Length")} (with @@ -98,7 +99,7 @@ treated as regular expression. When \code{regex = TRUE}, select \emph{must} be a character string (or a variable containing a character string) and is not allowed to be one of the supported select-helpers or a character vector of length > 1. \code{regex = TRUE} is comparable to using one of the two -select-helpers, \code{select = contains("")} or \code{select = regex("")}, however, +select-helpers, \code{select = contains()} or \code{select = regex()}, however, since the select-helpers may not work when called from inside other functions (see 'Details'), this argument may be used as workaround.} } diff --git a/man/row_count.Rd b/man/row_count.Rd index 7bf54fe5f..1a87de609 100644 --- a/man/row_count.Rd +++ b/man/row_count.Rd @@ -33,15 +33,16 @@ character vector of variable names including ranges specified via \code{:} \item a vector of negative integers, giving the positions counting from the right (e.g., \code{-1} or \code{-1:-3}), \item one of the following select-helpers: \code{starts_with()}, \code{ends_with()}, -\code{contains()}, a range using \code{:} or \code{regex("")}. \code{starts_with()}, +\code{contains()}, a range using \code{:}, or \code{regex()}. \code{starts_with()}, \code{ends_with()}, and \code{contains()} accept several patterns, e.g -\code{starts_with("Sep", "Petal")}. -\item or a function testing for logical conditions, e.g. \code{is.numeric()} (or +\code{starts_with("Sep", "Petal")}. \code{regex()} can be used to define regular +expression patterns. +\item a function testing for logical conditions, e.g. \code{is.numeric()} (or \code{is.numeric}), or any user-defined function that selects the variables for which the function returns \code{TRUE} (like: \code{foo <- function(x) mean(x) > 3}), \item ranges specified via literal variable names, select-helpers (except \code{regex()}) and (user-defined) functions can be negated, i.e. return -non-matching elements, when prefixed with a \code{-}, e.g. \code{-ends_with("")}, +non-matching elements, when prefixed with a \code{-}, e.g. \code{-ends_with()}, \code{-is.numeric} or \code{-(Sepal.Width:Petal.Length)}. \strong{Note:} Negation means that matches are \emph{excluded}, and thus, the \code{exclude} argument can be used alternatively. For instance, \code{select=-ends_with("Length")} (with @@ -76,7 +77,7 @@ treated as regular expression. When \code{regex = TRUE}, select \emph{must} be a character string (or a variable containing a character string) and is not allowed to be one of the supported select-helpers or a character vector of length > 1. \code{regex = TRUE} is comparable to using one of the two -select-helpers, \code{select = contains("")} or \code{select = regex("")}, however, +select-helpers, \code{select = contains()} or \code{select = regex()}, however, since the select-helpers may not work when called from inside other functions (see 'Details'), this argument may be used as workaround.} diff --git a/man/row_means.Rd b/man/row_means.Rd index 43d85b5b0..3c859e992 100644 --- a/man/row_means.Rd +++ b/man/row_means.Rd @@ -47,15 +47,16 @@ character vector of variable names including ranges specified via \code{:} \item a vector of negative integers, giving the positions counting from the right (e.g., \code{-1} or \code{-1:-3}), \item one of the following select-helpers: \code{starts_with()}, \code{ends_with()}, -\code{contains()}, a range using \code{:} or \code{regex("")}. \code{starts_with()}, +\code{contains()}, a range using \code{:}, or \code{regex()}. \code{starts_with()}, \code{ends_with()}, and \code{contains()} accept several patterns, e.g -\code{starts_with("Sep", "Petal")}. -\item or a function testing for logical conditions, e.g. \code{is.numeric()} (or +\code{starts_with("Sep", "Petal")}. \code{regex()} can be used to define regular +expression patterns. +\item a function testing for logical conditions, e.g. \code{is.numeric()} (or \code{is.numeric}), or any user-defined function that selects the variables for which the function returns \code{TRUE} (like: \code{foo <- function(x) mean(x) > 3}), \item ranges specified via literal variable names, select-helpers (except \code{regex()}) and (user-defined) functions can be negated, i.e. return -non-matching elements, when prefixed with a \code{-}, e.g. \code{-ends_with("")}, +non-matching elements, when prefixed with a \code{-}, e.g. \code{-ends_with()}, \code{-is.numeric} or \code{-(Sepal.Width:Petal.Length)}. \strong{Note:} Negation means that matches are \emph{excluded}, and thus, the \code{exclude} argument can be used alternatively. For instance, \code{select=-ends_with("Length")} (with @@ -95,7 +96,7 @@ treated as regular expression. When \code{regex = TRUE}, select \emph{must} be a character string (or a variable containing a character string) and is not allowed to be one of the supported select-helpers or a character vector of length > 1. \code{regex = TRUE} is comparable to using one of the two -select-helpers, \code{select = contains("")} or \code{select = regex("")}, however, +select-helpers, \code{select = contains()} or \code{select = regex()}, however, since the select-helpers may not work when called from inside other functions (see 'Details'), this argument may be used as workaround.} diff --git a/man/slide.Rd b/man/slide.Rd index 2950855f4..d68f7e30a 100644 --- a/man/slide.Rd +++ b/man/slide.Rd @@ -44,15 +44,16 @@ character vector of variable names including ranges specified via \code{:} \item a vector of negative integers, giving the positions counting from the right (e.g., \code{-1} or \code{-1:-3}), \item one of the following select-helpers: \code{starts_with()}, \code{ends_with()}, -\code{contains()}, a range using \code{:} or \code{regex("")}. \code{starts_with()}, +\code{contains()}, a range using \code{:}, or \code{regex()}. \code{starts_with()}, \code{ends_with()}, and \code{contains()} accept several patterns, e.g -\code{starts_with("Sep", "Petal")}. -\item or a function testing for logical conditions, e.g. \code{is.numeric()} (or +\code{starts_with("Sep", "Petal")}. \code{regex()} can be used to define regular +expression patterns. +\item a function testing for logical conditions, e.g. \code{is.numeric()} (or \code{is.numeric}), or any user-defined function that selects the variables for which the function returns \code{TRUE} (like: \code{foo <- function(x) mean(x) > 3}), \item ranges specified via literal variable names, select-helpers (except \code{regex()}) and (user-defined) functions can be negated, i.e. return -non-matching elements, when prefixed with a \code{-}, e.g. \code{-ends_with("")}, +non-matching elements, when prefixed with a \code{-}, e.g. \code{-ends_with()}, \code{-is.numeric} or \code{-(Sepal.Width:Petal.Length)}. \strong{Note:} Negation means that matches are \emph{excluded}, and thus, the \code{exclude} argument can be used alternatively. For instance, \code{select=-ends_with("Length")} (with @@ -87,7 +88,7 @@ treated as regular expression. When \code{regex = TRUE}, select \emph{must} be a character string (or a variable containing a character string) and is not allowed to be one of the supported select-helpers or a character vector of length > 1. \code{regex = TRUE} is comparable to using one of the two -select-helpers, \code{select = contains("")} or \code{select = regex("")}, however, +select-helpers, \code{select = contains()} or \code{select = regex()}, however, since the select-helpers may not work when called from inside other functions (see 'Details'), this argument may be used as workaround.} diff --git a/man/standardize.Rd b/man/standardize.Rd index fcc8c6ae7..8e8d66867 100644 --- a/man/standardize.Rd +++ b/man/standardize.Rd @@ -155,15 +155,16 @@ character vector of variable names including ranges specified via \code{:} \item a vector of negative integers, giving the positions counting from the right (e.g., \code{-1} or \code{-1:-3}), \item one of the following select-helpers: \code{starts_with()}, \code{ends_with()}, -\code{contains()}, a range using \code{:} or \code{regex("")}. \code{starts_with()}, +\code{contains()}, a range using \code{:}, or \code{regex()}. \code{starts_with()}, \code{ends_with()}, and \code{contains()} accept several patterns, e.g -\code{starts_with("Sep", "Petal")}. -\item or a function testing for logical conditions, e.g. \code{is.numeric()} (or +\code{starts_with("Sep", "Petal")}. \code{regex()} can be used to define regular +expression patterns. +\item a function testing for logical conditions, e.g. \code{is.numeric()} (or \code{is.numeric}), or any user-defined function that selects the variables for which the function returns \code{TRUE} (like: \code{foo <- function(x) mean(x) > 3}), \item ranges specified via literal variable names, select-helpers (except \code{regex()}) and (user-defined) functions can be negated, i.e. return -non-matching elements, when prefixed with a \code{-}, e.g. \code{-ends_with("")}, +non-matching elements, when prefixed with a \code{-}, e.g. \code{-ends_with()}, \code{-is.numeric} or \code{-(Sepal.Width:Petal.Length)}. \strong{Note:} Negation means that matches are \emph{excluded}, and thus, the \code{exclude} argument can be used alternatively. For instance, \code{select=-ends_with("Length")} (with @@ -201,7 +202,7 @@ treated as regular expression. When \code{regex = TRUE}, select \emph{must} be a character string (or a variable containing a character string) and is not allowed to be one of the supported select-helpers or a character vector of length > 1. \code{regex = TRUE} is comparable to using one of the two -select-helpers, \code{select = contains("")} or \code{select = regex("")}, however, +select-helpers, \code{select = contains()} or \code{select = regex()}, however, since the select-helpers may not work when called from inside other functions (see 'Details'), this argument may be used as workaround.} } diff --git a/man/to_factor.Rd b/man/to_factor.Rd index d544bdaae..7a500c071 100644 --- a/man/to_factor.Rd +++ b/man/to_factor.Rd @@ -46,15 +46,16 @@ character vector of variable names including ranges specified via \code{:} \item a vector of negative integers, giving the positions counting from the right (e.g., \code{-1} or \code{-1:-3}), \item one of the following select-helpers: \code{starts_with()}, \code{ends_with()}, -\code{contains()}, a range using \code{:} or \code{regex("")}. \code{starts_with()}, +\code{contains()}, a range using \code{:}, or \code{regex()}. \code{starts_with()}, \code{ends_with()}, and \code{contains()} accept several patterns, e.g -\code{starts_with("Sep", "Petal")}. -\item or a function testing for logical conditions, e.g. \code{is.numeric()} (or +\code{starts_with("Sep", "Petal")}. \code{regex()} can be used to define regular +expression patterns. +\item a function testing for logical conditions, e.g. \code{is.numeric()} (or \code{is.numeric}), or any user-defined function that selects the variables for which the function returns \code{TRUE} (like: \code{foo <- function(x) mean(x) > 3}), \item ranges specified via literal variable names, select-helpers (except \code{regex()}) and (user-defined) functions can be negated, i.e. return -non-matching elements, when prefixed with a \code{-}, e.g. \code{-ends_with("")}, +non-matching elements, when prefixed with a \code{-}, e.g. \code{-ends_with()}, \code{-is.numeric} or \code{-(Sepal.Width:Petal.Length)}. \strong{Note:} Negation means that matches are \emph{excluded}, and thus, the \code{exclude} argument can be used alternatively. For instance, \code{select=-ends_with("Length")} (with @@ -89,7 +90,7 @@ treated as regular expression. When \code{regex = TRUE}, select \emph{must} be a character string (or a variable containing a character string) and is not allowed to be one of the supported select-helpers or a character vector of length > 1. \code{regex = TRUE} is comparable to using one of the two -select-helpers, \code{select = contains("")} or \code{select = regex("")}, however, +select-helpers, \code{select = contains()} or \code{select = regex()}, however, since the select-helpers may not work when called from inside other functions (see 'Details'), this argument may be used as workaround.} } diff --git a/man/to_numeric.Rd b/man/to_numeric.Rd index 39f04c3a9..abfcec0d8 100644 --- a/man/to_numeric.Rd +++ b/man/to_numeric.Rd @@ -40,15 +40,16 @@ character vector of variable names including ranges specified via \code{:} \item a vector of negative integers, giving the positions counting from the right (e.g., \code{-1} or \code{-1:-3}), \item one of the following select-helpers: \code{starts_with()}, \code{ends_with()}, -\code{contains()}, a range using \code{:} or \code{regex("")}. \code{starts_with()}, +\code{contains()}, a range using \code{:}, or \code{regex()}. \code{starts_with()}, \code{ends_with()}, and \code{contains()} accept several patterns, e.g -\code{starts_with("Sep", "Petal")}. -\item or a function testing for logical conditions, e.g. \code{is.numeric()} (or +\code{starts_with("Sep", "Petal")}. \code{regex()} can be used to define regular +expression patterns. +\item a function testing for logical conditions, e.g. \code{is.numeric()} (or \code{is.numeric}), or any user-defined function that selects the variables for which the function returns \code{TRUE} (like: \code{foo <- function(x) mean(x) > 3}), \item ranges specified via literal variable names, select-helpers (except \code{regex()}) and (user-defined) functions can be negated, i.e. return -non-matching elements, when prefixed with a \code{-}, e.g. \code{-ends_with("")}, +non-matching elements, when prefixed with a \code{-}, e.g. \code{-ends_with()}, \code{-is.numeric} or \code{-(Sepal.Width:Petal.Length)}. \strong{Note:} Negation means that matches are \emph{excluded}, and thus, the \code{exclude} argument can be used alternatively. For instance, \code{select=-ends_with("Length")} (with @@ -94,7 +95,7 @@ treated as regular expression. When \code{regex = TRUE}, select \emph{must} be a character string (or a variable containing a character string) and is not allowed to be one of the supported select-helpers or a character vector of length > 1. \code{regex = TRUE} is comparable to using one of the two -select-helpers, \code{select = contains("")} or \code{select = regex("")}, however, +select-helpers, \code{select = contains()} or \code{select = regex()}, however, since the select-helpers may not work when called from inside other functions (see 'Details'), this argument may be used as workaround.}