Skip to content

Commit 978cde7

Browse files
Fix inconsitencies in docs (#565)
* Fix inconsitencies in docs * Update R/extract_column_names.R Co-authored-by: Etienne Bacher <[email protected]> * update rd (comma) --------- Co-authored-by: Etienne Bacher <[email protected]>
1 parent b727cb6 commit 978cde7

35 files changed

+218
-177
lines changed

β€ŽR/extract_column_names.Rβ€Ž

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -19,15 +19,16 @@
1919
#' - a vector of negative integers, giving the positions counting from the
2020
#' right (e.g., `-1` or `-1:-3`),
2121
#' - one of the following select-helpers: `starts_with()`, `ends_with()`,
22-
#' `contains()`, a range using `:` or `regex("")`. `starts_with()`,
22+
#' `contains()`, a range using `:`, or `regex()`. `starts_with()`,
2323
#' `ends_with()`, and `contains()` accept several patterns, e.g
24-
#' `starts_with("Sep", "Petal")`.
25-
#' - or a function testing for logical conditions, e.g. `is.numeric()` (or
24+
#' `starts_with("Sep", "Petal")`. `regex()` can be used to define regular
25+
#' expression patterns.
26+
#' - a function testing for logical conditions, e.g. `is.numeric()` (or
2627
#' `is.numeric`), or any user-defined function that selects the variables
2728
#' for which the function returns `TRUE` (like: `foo <- function(x) mean(x) > 3`),
2829
#' - ranges specified via literal variable names, select-helpers (except
2930
#' `regex()`) and (user-defined) functions can be negated, i.e. return
30-
#' non-matching elements, when prefixed with a `-`, e.g. `-ends_with("")`,
31+
#' non-matching elements, when prefixed with a `-`, e.g. `-ends_with()`,
3132
#' `-is.numeric` or `-(Sepal.Width:Petal.Length)`. **Note:** Negation means
3233
#' that matches are _excluded_, and thus, the `exclude` argument can be
3334
#' used alternatively. For instance, `select=-ends_with("Length")` (with
@@ -48,7 +49,7 @@
4849
#' character string (or a variable containing a character string) and is not
4950
#' allowed to be one of the supported select-helpers or a character vector
5051
#' of length > 1. `regex = TRUE` is comparable to using one of the two
51-
#' select-helpers, `select = contains("")` or `select = regex("")`, however,
52+
#' select-helpers, `select = contains()` or `select = regex()`, however,
5253
#' since the select-helpers may not work when called from inside other
5354
#' functions (see 'Details'), this argument may be used as workaround.
5455
#' @param verbose Toggle warnings.
@@ -131,7 +132,10 @@
131132
#' numeric_mean_35 <- function(x) is.numeric(x) && mean(x, na.rm = TRUE) > 3.5
132133
#' extract_column_names(iris, numeric_mean_35)
133134
#'
134-
#' # find range of colum names by range, using character vector
135+
#' # find column names, using range
136+
#' extract_column_names(mtcars, c(cyl:hp, wt))
137+
#'
138+
#' # find range of column names by range, using character vector
135139
#' extract_column_names(mtcars, c("cyl:hp", "wt"))
136140
#'
137141
#' # rename returned columns for "data_select()"

β€Žman/adjust.Rdβ€Ž

Lines changed: 6 additions & 5 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

β€Žman/assign_labels.Rdβ€Ž

Lines changed: 6 additions & 5 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

β€Žman/categorize.Rdβ€Ž

Lines changed: 6 additions & 5 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

β€Žman/center.Rdβ€Ž

Lines changed: 6 additions & 5 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

β€Žman/convert_na_to.Rdβ€Ž

Lines changed: 6 additions & 5 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

β€Žman/convert_to_na.Rdβ€Ž

Lines changed: 6 additions & 5 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

β€Žman/data_codebook.Rdβ€Ž

Lines changed: 6 additions & 5 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

β€Žman/data_duplicated.Rdβ€Ž

Lines changed: 6 additions & 5 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
Β (0)