From e1b66afbc13bdde640ba45cfb36a1dd1f0e22416 Mon Sep 17 00:00:00 2001 From: Lionel Henry Date: Tue, 29 Dec 2015 12:29:59 +0100 Subject: [PATCH] Provide alias for deprecated map_rows() --- NAMESPACE | 1 + R/rows.R | 9 +++++++++ man/by_row.Rd | 1 + 3 files changed, 11 insertions(+) diff --git a/NAMESPACE b/NAMESPACE index 6d0c7675..846eaea0 100644 --- a/NAMESPACE +++ b/NAMESPACE @@ -98,6 +98,7 @@ export(map_if) export(map_int) export(map_lgl) export(map_n) +export(map_rows) export(negate) export(order_by) export(partial) diff --git a/R/rows.R b/R/rows.R index 0101ad79..f01e398b 100644 --- a/R/rows.R +++ b/R/rows.R @@ -214,6 +214,15 @@ invoke_rows <- function(.f, .d, ..., .collate = c("list", "rows", "cols"), .Call(invoke_rows_impl, environment(), ".d", ".f") } +#' @export +#' @usage NULL +#' @rdname by_row +map_rows <- function(.d, .f, ..., .labels = TRUE) { + warning("`map_rows()` is deprecated; please use `invoke_rows()` instead.", + call. = FALSE) + invoke_rows(.f, .d, ..., .labels = .labels) +} + #' Slice a data frame into groups of rows #' diff --git a/man/by_row.Rd b/man/by_row.Rd index 5d796b6e..aaf41879 100644 --- a/man/by_row.Rd +++ b/man/by_row.Rd @@ -3,6 +3,7 @@ \name{by_row} \alias{by_row} \alias{invoke_rows} +\alias{map_rows} \title{Apply a function to each row of a data frame} \usage{ by_row(.d, ..f, ..., .collate = c("list", "rows", "cols"), .to = ".out",