Skip to content

Commit

Permalink
Make not runnable some examples to pass CRAN check
Browse files Browse the repository at this point in the history
  • Loading branch information
gdemin committed Nov 5, 2022
1 parent 7c2965f commit e4a9cdc
Show file tree
Hide file tree
Showing 8 changed files with 18 additions and 4 deletions.
2 changes: 2 additions & 0 deletions R/cross.R
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,7 @@ TOTAL_STATISTICS = c("u_cases", "w_cases", "u_responses", "w_responses", "u_cpct
#' @seealso \link{tables}, \link{fre}, \link{cro_fun}.
#'
#' @examples
#' \dontrun{
#' data(mtcars)
#' mtcars = apply_labels(mtcars,
#' mpg = "Miles/(US) gallon",
Expand Down Expand Up @@ -136,6 +137,7 @@ TOTAL_STATISTICS = c("u_cases", "w_cases", "u_responses", "w_responses", "u_cpct
#' cross_cpct(brands, mrset(brand_1 %to% brand_4), list(total(), score))
#' # responses
#' cross_cpct_responses(brands, mrset(brand_1 %to% brand_4), list(total(), score))
#' }
#' @export
cross_cases = function(data,
cell_vars,
Expand Down
2 changes: 2 additions & 0 deletions R/custom_tables.R
Original file line number Diff line number Diff line change
Expand Up @@ -137,6 +137,7 @@ SIGNIFICANCE_OPTIONS = "significance_options"
#'
#' @name tables
#' @examples
#' \dontrun{
#' data(mtcars)
#' mtcars = apply_labels(mtcars,
#' mpg = "Miles/(US) gallon",
Expand Down Expand Up @@ -358,6 +359,7 @@ SIGNIFICANCE_OPTIONS = "significance_options"
#' tab_stat_fun(Mean = w_mean, "Std. dev." = w_sd, "Valid N" = w_n)
#' }
#' tables %>% tab_pivot()
#' }
tab_cols = function(data, ...){
data = check_class(data)
expr = substitute(list(...))
Expand Down
4 changes: 3 additions & 1 deletion R/prepend_names.R
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
#' @export
#'
#' @examples
#' \dontrun{
#' data(mtcars)
#' mtcars = apply_labels(mtcars,
#' mpg = "Miles/(US) gallon",
Expand Down Expand Up @@ -60,7 +61,8 @@
#' tab_prepend_all %>%
#' tab_cols(total(), vs, am) %>%
#' tab_stat_cpct() %>%
#' tab_pivot()
#' tab_pivot()
#' }
prepend_values = function(x){
UseMethod("prepend_values")
}
Expand Down
3 changes: 2 additions & 1 deletion R/tab_sort.R
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@
#' @export
#'
#' @examples
#' \dontrun{
#' data(mtcars)
#'
#' # apply labels
Expand Down Expand Up @@ -55,7 +56,7 @@
#' mtcars %>%
#' cross_cpct(list(cyl, gear, carb), list("#total", vs, am)) %>%
#' tab_sort_desc((sorting_column))
#'
#' }
tab_sort_asc = function(x, ..., excluded_rows = "#", na.last = FALSE){
UseMethod("tab_sort_asc")
}
Expand Down
2 changes: 2 additions & 0 deletions man/cross_cases.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 3 additions & 1 deletion man/prepend_values.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 2 additions & 1 deletion man/tab_sort_asc.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 2 additions & 0 deletions man/tables.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit e4a9cdc

Please sign in to comment.