tidyverse / duckplyr

A drop-in replacement for dplyr, powered by DuckDB for performance.
https://duckplyr.tidyverse.org/
Other
285 stars 19 forks source link

Missing docs for S3 methods? #214

Open hadley opened 3 months ago

hadley commented 3 months ago

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.

krlmlr commented 1 month ago

DoD:

maelle commented 3 days ago

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?).

maelle commented 3 days ago

Then I need to get to the first item in your list @krlmlr 😁

maelle commented 3 days ago

One process that gets me to having two manual pages loaded for ?mutate.

Image

#' @importFrom dplyr mutate
#' @rdname mutate
#' @export
dplyr::mutate
# 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
maelle commented 3 days ago

Using something like https://github.com/eliocamp/rhelpi18n/blob/main/R/zzzz.R might be a step too far?