From 6b65596532ae6e2636216819767792395a4f7e8f Mon Sep 17 00:00:00 2001 From: rsquaredin Date: Fri, 28 Dec 2018 10:57:19 +0530 Subject: [PATCH] unwrap examples --- R/rbin-create-bins.R | 2 -- R/rbin-equal-freq.R | 2 -- R/rbin-equal-length.R | 2 -- R/rbin-factor.R | 8 ++------ R/rbin-manual.R | 4 +--- R/rbin-quantile.R | 4 +--- R/rbin-winsorize.R | 2 -- man/rbin_create.Rd | 2 -- man/rbin_equal_freq.Rd | 2 -- man/rbin_equal_length.Rd | 2 -- man/rbin_factor.Rd | 2 -- man/rbin_factor_create.Rd | 2 -- man/rbin_manual.Rd | 2 -- man/rbin_quantiles.Rd | 2 -- man/rbin_winsorize.Rd | 2 -- 15 files changed, 4 insertions(+), 36 deletions(-) diff --git a/R/rbin-create-bins.R b/R/rbin-create-bins.R index e6e0184..24aa293 100644 --- a/R/rbin-create-bins.R +++ b/R/rbin-create-bins.R @@ -9,10 +9,8 @@ #' @return \code{data} with dummy variables. #' #' @examples -#' \donttest{ #' k <- rbin_manual(mbank, y, age, c(29, 31, 34, 36, 39, 42, 46, 51, 56)) #' rbin_create(mbank, age, k) -#' } #' #' @export #' diff --git a/R/rbin-equal-freq.R b/R/rbin-equal-freq.R index 47516f0..748a765 100644 --- a/R/rbin-equal-freq.R +++ b/R/rbin-equal-freq.R @@ -10,9 +10,7 @@ #' @return A \code{tibble}. #' #' @examples -#' \donttest{ #' rbin_equal_freq(mbank, y, age, 10) -#' } #' #' @importFrom magrittr %>% #' @importFrom rlang !! diff --git a/R/rbin-equal-length.R b/R/rbin-equal-length.R index 56fbe6f..694307d 100644 --- a/R/rbin-equal-length.R +++ b/R/rbin-equal-length.R @@ -13,14 +13,12 @@ #' @return A \code{tibble}. #' #' @examples -#' \donttest{ #' bins <- rbin_equal_length(mbank, y, age, 10) #' bins #' #' # plot #' plot(bins) #' -#' } #' @export #' rbin_equal_length <- function(data = NULL, response = NULL, predictor = NULL, bins = 10, include_na = TRUE) UseMethod("rbin_equal_length") diff --git a/R/rbin-factor.R b/R/rbin-factor.R index 4a35909..d95cf2c 100644 --- a/R/rbin-factor.R +++ b/R/rbin-factor.R @@ -58,14 +58,12 @@ rbin_factor_combine <- function(data, var, new_var, new_name) { #' @param ... further arguments passed to or from other methods. #' #' @examples -#' \donttest{ #' bins <- rbin_factor(mbank, y, education) #' bins #' #' # plot #' plot(bins) -#' } -#' +#' #' @importFrom magrittr %<>% #' #' @export @@ -178,12 +176,10 @@ plot.rbin_factor <- function(x, ...) { #' @return A \code{tibble} with dummy variables. #' #' @examples -#' \donttest{ #' upper <- c("secondary", "tertiary") #' out <- rbin_factor_combine(mbank, education, upper, "upper") #' rbin_factor_create(out, education) -#' } -#' +#' #' @export #' rbin_factor_create <- function(data, predictor) { diff --git a/R/rbin-manual.R b/R/rbin-manual.R index b1600b2..3a7f8d2 100644 --- a/R/rbin-manual.R +++ b/R/rbin-manual.R @@ -19,14 +19,12 @@ #' values between the minimum and including 36, then you will enter the value 37. #' #' @examples -#' \donttest{ #' bins <- rbin_manual(mbank, y, age, c(29, 31, 34, 36, 39, 42, 46, 51, 56)) #' bins #' #' # plot #' plot(bins) -#' } -#' +#' #' @export #' rbin_manual <- function(data = NULL, response = NULL, predictor = NULL, cut_points = NULL, include_na = TRUE) UseMethod("rbin_manual") diff --git a/R/rbin-quantile.R b/R/rbin-quantile.R index 697c557..383e5a8 100644 --- a/R/rbin-quantile.R +++ b/R/rbin-quantile.R @@ -13,14 +13,12 @@ #' @return A \code{tibble}. #' #' @examples -#' \donttest{ #' bins <- rbin_quantiles(mbank, y, age, 10) #' bins #' #' # plot #' plot(bins) -#' } -#' +#' #' @export #' rbin_quantiles <- function(data = NULL, response = NULL, predictor = NULL, bins = 10, include_na = TRUE) UseMethod("rbin_quantiles") diff --git a/R/rbin-winsorize.R b/R/rbin-winsorize.R index 146ff64..251869b 100644 --- a/R/rbin-winsorize.R +++ b/R/rbin-winsorize.R @@ -16,13 +16,11 @@ #' @return A \code{tibble}. #' #' @examples -#' \donttest{ #' bins <- rbin_winsorize(mbank, y, age, 10, winsor_rate = 0.05) #' bins #' #' # plot #' plot(bins) -#' } #' #' @export #' diff --git a/man/rbin_create.Rd b/man/rbin_create.Rd index 927c5a7..b08c88a 100644 --- a/man/rbin_create.Rd +++ b/man/rbin_create.Rd @@ -20,9 +20,7 @@ rbin_create(data, predictor, bins) Create dummy variables from bins. } \examples{ -\donttest{ k <- rbin_manual(mbank, y, age, c(29, 31, 34, 36, 39, 42, 46, 51, 56)) rbin_create(mbank, age, k) -} } diff --git a/man/rbin_equal_freq.Rd b/man/rbin_equal_freq.Rd index 43fb2c7..5952425 100644 --- a/man/rbin_equal_freq.Rd +++ b/man/rbin_equal_freq.Rd @@ -23,8 +23,6 @@ A \code{tibble}. Bin continuous data using the equal frequency binning method. } \examples{ -\donttest{ rbin_equal_freq(mbank, y, age, 10) -} } diff --git a/man/rbin_equal_length.Rd b/man/rbin_equal_length.Rd index 633a9c7..a800257 100644 --- a/man/rbin_equal_length.Rd +++ b/man/rbin_equal_length.Rd @@ -32,7 +32,6 @@ A \code{tibble}. Bin continuous data using the equal length binning method. } \examples{ -\donttest{ bins <- rbin_equal_length(mbank, y, age, 10) bins @@ -40,4 +39,3 @@ bins plot(bins) } -} diff --git a/man/rbin_factor.Rd b/man/rbin_factor.Rd index 8f17e5e..27a2ba0 100644 --- a/man/rbin_factor.Rd +++ b/man/rbin_factor.Rd @@ -27,12 +27,10 @@ rbin_factor(data = NULL, response = NULL, predictor = NULL, Weight of evidence and information value for categorical data. } \examples{ -\donttest{ bins <- rbin_factor(mbank, y, education) bins # plot plot(bins) -} } diff --git a/man/rbin_factor_create.Rd b/man/rbin_factor_create.Rd index c981136..d7e3dd3 100644 --- a/man/rbin_factor_create.Rd +++ b/man/rbin_factor_create.Rd @@ -18,10 +18,8 @@ A \code{tibble} with dummy variables. Create dummy variables for categorical data. } \examples{ -\donttest{ upper <- c("secondary", "tertiary") out <- rbin_factor_combine(mbank, education, upper, "upper") rbin_factor_create(out, education) -} } diff --git a/man/rbin_manual.Rd b/man/rbin_manual.Rd index 6853dda..cb4b818 100644 --- a/man/rbin_manual.Rd +++ b/man/rbin_manual.Rd @@ -39,12 +39,10 @@ Specify the upper open interval for each bin. `rbin` values between the minimum and including 36, then you will enter the value 37. } \examples{ -\donttest{ bins <- rbin_manual(mbank, y, age, c(29, 31, 34, 36, 39, 42, 46, 51, 56)) bins # plot plot(bins) -} } diff --git a/man/rbin_quantiles.Rd b/man/rbin_quantiles.Rd index 98c0fa5..8bfca9d 100644 --- a/man/rbin_quantiles.Rd +++ b/man/rbin_quantiles.Rd @@ -32,12 +32,10 @@ A \code{tibble}. Bin continuous data using quantiles. } \examples{ -\donttest{ bins <- rbin_quantiles(mbank, y, age, 10) bins # plot plot(bins) -} } diff --git a/man/rbin_winsorize.Rd b/man/rbin_winsorize.Rd index a403e31..b0dbb70 100644 --- a/man/rbin_winsorize.Rd +++ b/man/rbin_winsorize.Rd @@ -39,12 +39,10 @@ A \code{tibble}. Bin continuous data using winsorized method. } \examples{ -\donttest{ bins <- rbin_winsorize(mbank, y, age, 10, winsor_rate = 0.05) bins # plot plot(bins) -} }