Skip to content

Commit

Permalink
silence before the storm
Browse files Browse the repository at this point in the history
  • Loading branch information
DominiqueMakowski committed Oct 9, 2020
1 parent 66f48c9 commit a8e9e0a
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 2 deletions.
7 changes: 6 additions & 1 deletion R/utils_dataframe.R
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#' Safe data frame Modification
#' Safe and convenient data frame utilities
#'
#' Rename/remove a variable in a data frame if exists.
#'
Expand All @@ -10,9 +10,14 @@
#' @return A modified data frame.
#'
#' @examples
#' # Rename columns
#' rename_if_possible(iris, "Sepal.Length", "length")
#' rename_if_possible(iris, "FakeCol", "length")
#'
#' # Remove columns
#' remove_if_possible(iris, "Sepal.Length")
#'
#' # Reorder columns
#' reorder_if_possible(iris, c("Species", "Sepal.Length"))
#' @export
rename_if_possible <- function(x, pattern, replacement) {
Expand Down
7 changes: 6 additions & 1 deletion man/rename_if_possible.Rd

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

0 comments on commit a8e9e0a

Please sign in to comment.