Open hadley opened 3 months ago
DoD:
?mutate
as soon as duckplyr is loaded?dbplyr::mutate.tbl_lazy
Where to put the source for the docs: in a script called mutate.R
for instance under tools/manual
? Then the tools/02-duckplyr_df-methods.R
would be edited to add the content of tools/manual/mutate.R
and to automatically create part of the tags (for instance using the same title as dplyr but putting "(duckplyr)", adding a @seealso
tag pointing to the manual page in dplyr, probably other parts of the dplyr manual page?).
Then I need to get to the first item in your list @krlmlr 😁
One process that gets me to having two manual pages loaded for ?mutate
.
R/duckplyr-package.R
, add an @export
tag (before I did that, ?mutate
would be for the dplyr page, ?mutate.duckplyr_df
for the duckplyr page)#' @importFrom dplyr mutate
#' @rdname mutate
#' @export
dplyr::mutate
R/mutate.R
have (I realize that this script should not be edited manually)# Generated by 02-duckplyr_df-methods.R
#' @rdname mutate
#' @title Create, modify, and delete columns (duckplyr)
#'
#' @description blabla
#'
#' @examples
#' library("duckplyr")
#' df <- data.frame(x = c(1, 2), row.names = c("a", "b"))
#' df <- mutate(df, y = 2)
#' df
#' @seealso [`dplyr::mutate()`]
#' @export
document()
Using something like https://github.com/eliocamp/rhelpi18n/blob/main/R/zzzz.R might be a step too far?
I think it would be useful to document
mutate()
,filter()
etc methods so its obvious that duckplyr supports them. This would also be a good place to document any differences in behaviour.