From 5d95b7e5ceb662dbba02e60425f2d2b9e1280d54 Mon Sep 17 00:00:00 2001 From: Nick Christofides <118103879+NicChr@users.noreply.github.com> Date: Thu, 17 Oct 2024 00:27:31 +0100 Subject: [PATCH] Updated news. --- NEWS.md | 8 ++++++++ R/factors.R | 2 +- man/factors.Rd | 2 +- 3 files changed, 10 insertions(+), 2 deletions(-) diff --git a/NEWS.md b/NEWS.md index a561e88..19099eb 100644 --- a/NEWS.md +++ b/NEWS.md @@ -1,5 +1,13 @@ # cheapr (Development version) +* `overview` cols are abbreviated to save visual space and histograms are +printed by default. + +* New fast function `lump_levels` for keeping only the top n levels in terms +of frequency. + +* `levels_drop` was not working correctly and has been fixed. + # cheapr 0.9.9 * New functions `cheapr_var` and `cheapr_rev`. diff --git a/R/factors.R b/R/factors.R index c77f396..e3adc1b 100644 --- a/R/factors.R +++ b/R/factors.R @@ -82,7 +82,7 @@ #' count = tabulate(f)) #' } #' -#' get_top_n(x, 5) +#' get_top_n(x, 3) #' @export #' @rdname factors factor_ <- function( diff --git a/man/factors.Rd b/man/factors.Rd index b3da87e..b5e1732 100644 --- a/man/factors.Rd +++ b/man/factors.Rd @@ -145,5 +145,5 @@ get_top_n <- function(x, n){ count = tabulate(f)) } -get_top_n(x, 5) +get_top_n(x, 3) }