# Generated by 02-duckplyr_df-methods.R
#' @export
add_count.duckplyr_df <- function(x, ..., wt = NULL, sort = FALSE, name = NULL, .drop = deprecated()) {
# Our implementation
rel_try(NULL,
"No relational implementation for add_count()" = TRUE,
{
return(out)
}
)
# dplyr forward
add_count <- dplyr$add_count.data.frame
out <- add_count(x, ..., wt = {{ wt }}, sort = sort, name = name, .drop = .drop)
return(out)
# dplyr implementation
out <- add_count_impl(
x,
...,
wt = {{ wt }},
sort = sort,
name = name,
.drop = .drop
)
dplyr_reconstruct(out, x)
}
duckplyr_add_count <- function(x, ...) {
try_fetch(
x <- as_duckplyr_df(x),
error = function(e) {
testthat::skip(conditionMessage(e))
}
)
out <- add_count(x, ...)
class(out) <- setdiff(class(out), "duckplyr_df")
out
}
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.