Skip to content

Commit

Permalink
Fix re-exports
Browse files Browse the repository at this point in the history
  • Loading branch information
fikovnik committed Oct 14, 2022
1 parent 9fe0e53 commit 47c15b6
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
1 change: 1 addition & 0 deletions NAMESPACE
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ importFrom(contractr,infer_type)
importFrom(contractr,parse_type)
importFrom(dplyr,anti_join)
importFrom(dplyr,bind_rows)
importFrom(dplyr,count)
importFrom(dplyr,everything)
importFrom(dplyr,filter)
importFrom(dplyr,group_by)
Expand Down
5 changes: 3 additions & 2 deletions R/fmt.R
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,12 @@ pretty_print <- function(x, ...) {
UseMethod("pretty_print")
}

#' @importFrom dplyr count mutate
#' @export
cs_count <- function(df, ...) {
n_rows = nrow(df)
count(df, ..., sort=TRUE) %>%
mutate(p=n/n_rows*100, cp=cumsum(p))
dplyr::count(df, ..., sort = TRUE) %>%
dplyr::mutate(p = n / n_rows * 100, cp = cumsum(p))
}

## Formatting
Expand Down

0 comments on commit 47c15b6

Please sign in to comment.