Skip to content

Commit

Permalink
more crossrefs via shared See Also section
Browse files Browse the repository at this point in the history
  • Loading branch information
DominiqueMakowski committed Mar 5, 2022
1 parent 3c03f96 commit 95127e9
Show file tree
Hide file tree
Showing 17 changed files with 76 additions and 13 deletions.
1 change: 1 addition & 0 deletions R/data_match.R
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@
#' # observations where EITHER "vs" is 0 OR "am" is 1
#' matching_rows <- data_match(mtcars, data.frame(vs = 0, am = 1), match = "or")
#' mtcars[matching_rows, ]
#' @inherit data_rename seealso
#' @export
data_match <- function(x, to, match = "and", as_data_frame = FALSE, ...) {

Expand Down
2 changes: 1 addition & 1 deletion R/data_merge.R
Original file line number Diff line number Diff line change
Expand Up @@ -159,7 +159,7 @@
#' y$id <- 4:7
#' z$id <- 3:10
#' data_merge(list(x, y, z), join = "bind", by = "id", id = "source")
#'
#' @inherit data_rename seealso
#' @export
data_merge <- function(x, ...) {
UseMethod("data_merge")
Expand Down
1 change: 1 addition & 0 deletions R/data_partition.R
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@
#' data_partition(df)
#' data_partition(df, group = "Species")
#' data_partition(df, group = c("Species", "Smell"))
#' @inherit data_rename seealso
#' @export
data_partition <- function(data,
training_proportion = 0.7,
Expand Down
6 changes: 5 additions & 1 deletion R/data_rename.R
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,12 @@
#' head(data_rename(iris, paste0("Var", 1:5)))
#'
#' @seealso
#' - Functions to rename stuff: [data_rename()], [data_rename_rows()], [data_addprefix()], [data_addsufix()]
#' - Functions to rename stuff: [data_rename()], [data_rename_rows()], [data_addprefix()], [data_addsuffix()]
#' - Functions to reorder, find and remove columns: [data_findcols()], [data_reorder()], [data_remove()]
#' - Functions to reshape, pivot or rotate dataframes: [data_to_long()], [data_to_wide()], [data_rotate()]
#' - Functions to rescale and reverse: [data_rescale()], [data_reverse()]
#' - Functions to standardize, normalize, rank-transform: [standardize()], [normalize()], [ranktransform()]
#' - Split, cut and merge dataframes: [data_partition()], [data_cut()], [data_match()], [data_merge()]
#'
#' @export
data_rename <- function(data, pattern = NULL, replacement = NULL, safe = TRUE, ...) {
Expand Down
2 changes: 1 addition & 1 deletion R/data_rescale.R
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@
#' "Sepal.Length" = c(0, 1),
#' "Petal.Length" = c(-1, 0)
#' )))
#' @seealso [normalize()] [standardize()] [ranktransform()]
#' @inherit data_rename seealso
#'
#' @return A rescaled object.
#'
Expand Down
2 changes: 2 additions & 0 deletions R/data_reshape.R
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,8 @@
#' )
#' head(wide)
#' }
#'
#' @inherit data_rename seealso
#' @return data.frame
#' @export
data_to_long <- function(data,
Expand Down
3 changes: 1 addition & 2 deletions R/data_reverse.R
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,7 @@
#'
#' @family transform utilities
#'
#' @seealso [data_rescale()] to change the score range for variables (potentially while reversing),
#' [normalize()] [standardize()] [ranktransform()]
#' @inherit data_rename seealso
#'
#' @export
data_reverse <- function(x, ...) {
Expand Down
2 changes: 2 additions & 0 deletions R/data_rotate.R
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,8 @@
#' x <- data.frame(a = 1:5, b = 11:15, c = letters[1:5], d = rnorm(5))
#' data_rotate(x, colnames = TRUE)
#' data_rotate(x, colnames = "c")
#'
#' @inherit data_rename seealso
#' @export
data_rotate <- function(data, rownames = NULL, colnames = FALSE, verbose = TRUE) {
# copy attributes
Expand Down
10 changes: 10 additions & 0 deletions man/data_match.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

11 changes: 10 additions & 1 deletion man/data_merge.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

10 changes: 10 additions & 0 deletions man/data_partition.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 5 additions & 1 deletion man/data_rename.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 5 additions & 1 deletion man/data_reorder.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 0 additions & 2 deletions man/data_rescale.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 0 additions & 3 deletions man/data_reverse.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

11 changes: 11 additions & 0 deletions man/data_rotate.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

11 changes: 11 additions & 0 deletions man/data_to_long.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 95127e9

Please sign in to comment.