diff --git a/DESCRIPTION b/DESCRIPTION index 42618ff..cd0b98d 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -1,7 +1,7 @@ Package: expss Type: Package Title: Tables, Labels and Some Useful Functions from Spreadsheets and 'SPSS' Statistics -Version: 0.11.5 +Version: 0.11.6 Maintainer: Gregory Demin Authors@R: c( person("Gregory", "Demin", email = "gdemin@gmail.com", diff --git a/NEWS b/NEWS index 5c4c0ee..e2793ac 100644 --- a/NEWS +++ b/NEWS @@ -1,4 +1,4 @@ -0.11.5 (10.07.2023) +0.11.6 (14.07.2023) ================ * add 'as_spss' argument to 'significance_cpct' for more SPSS-compatible results (issue #100) * add rounding option (issue #100) diff --git a/R/dichotomy.R b/R/dichotomy.R index 9df4eb0..6faba0e 100644 --- a/R/dichotomy.R +++ b/R/dichotomy.R @@ -40,6 +40,7 @@ #' @seealso \code{\link{as.category}} for reverse conversion, \link{mrset}, #' \link{mdset} for usage multiple-response variables with tables. #' @examples +#' data.table::setDTthreads(2) #' # toy example #' # brands - multiple response question #' # Which brands do you use during last three months? diff --git a/R/labels.R b/R/labels.R index 2ce708f..a4d8d0f 100644 --- a/R/labels.R +++ b/R/labels.R @@ -230,6 +230,7 @@ add_labelled_class.data.frame = add_labelled_class.list #' @export #' @examples #' # toy example +#' data.table::setDTthreads(2) #' set.seed(123) #' # score - evaluation of tested product #' diff --git a/R/merge.R b/R/merge.R index d2a8ce5..2054152 100644 --- a/R/merge.R +++ b/R/merge.R @@ -26,6 +26,7 @@ #' @export #' #' @examples +#' data.table::setDTthreads(2) #' data(mtcars) #' # apply labels #' mtcars = apply_labels(mtcars, diff --git a/R/mrset.R b/R/mrset.R index 6a42317..2c63a86 100644 --- a/R/mrset.R +++ b/R/mrset.R @@ -25,6 +25,7 @@ #' @export #' #' @examples +#' data.table::setDTthreads(2) #' data(product_test) #' #' cross_cpct(product_test, mrset(a1_1 %to% a1_6)) diff --git a/R/nest.R b/R/nest.R index 63024b4..0642220 100644 --- a/R/nest.R +++ b/R/nest.R @@ -30,6 +30,7 @@ #' carb = "Number of carburetors" #' ) #' +#' data.table::setDTthreads(2) # for running on CRAN #' cross_cases(mtcars, cyl, am %nest% vs) #' #' # list of variables diff --git a/R/significance_cpct.R b/R/significance_cpct.R index e4556ab..bc6b49a 100644 --- a/R/significance_cpct.R +++ b/R/significance_cpct.R @@ -177,13 +177,13 @@ KEEP_STAT = c("percent", "cases", "means", "bases", "sd", "none") #' carb = "Number of carburetors" #' ) #' +#' \dontrun{ #' mtcars_table = cross_cpct(mtcars, #' list(cyl, gear), #' list(total(), vs, am) #' ) #' #' significance_cpct(mtcars_table) -#' \dontrun{ #' # comparison with first column #' significance_cpct(mtcars_table, compare_type = "first_column") #' diff --git a/R/split_labels.R b/R/split_labels.R index c82d53d..bc434ac 100644 --- a/R/split_labels.R +++ b/R/split_labels.R @@ -29,6 +29,7 @@ #' @export #' @seealso \link[base]{strsplit} #' @examples +#' data.table::setDTthreads(2) #' data(mtcars) #' #' # apply labels diff --git a/R/subtotal.R b/R/subtotal.R index 1f50fa0..0473ced 100644 --- a/R/subtotal.R +++ b/R/subtotal.R @@ -33,6 +33,7 @@ #' @param data intermediate table. See \link{tables}. #' @return multiple response set or list of the multiple response sets #' @examples +#' data.table::setDTthreads(2) #' ol = c(1:7, 99) #' var_lab(ol) = "Liking" #' val_lab(ol) = num_lab(" diff --git a/man/as.dichotomy.Rd b/man/as.dichotomy.Rd index d4219b2..a55dc1a 100644 --- a/man/as.dichotomy.Rd +++ b/man/as.dichotomy.Rd @@ -99,6 +99,7 @@ because any column of such matrix usually is linear combinations of other column } } \examples{ +data.table::setDTthreads(2) # toy example # brands - multiple response question # Which brands do you use during last three months? diff --git a/man/merge.etable.Rd b/man/merge.etable.Rd index 4be57fe..ab7d404 100644 --- a/man/merge.etable.Rd +++ b/man/merge.etable.Rd @@ -56,6 +56,7 @@ ones. See examples. Strange result is possible if one or two arguments have duplicates in first column (column with labels). } \examples{ +data.table::setDTthreads(2) data(mtcars) # apply labels mtcars = apply_labels(mtcars, diff --git a/man/mrset.Rd b/man/mrset.Rd index 7e47ea6..2b5674d 100644 --- a/man/mrset.Rd +++ b/man/mrset.Rd @@ -55,6 +55,7 @@ arguments. For details see \link{..t} and \link{text_expand}.} } } \examples{ +data.table::setDTthreads(2) data(product_test) cross_cpct(product_test, mrset(a1_1 \%to\% a1_6)) diff --git a/man/nest.Rd b/man/nest.Rd index cc65110..d8daa7b 100644 --- a/man/nest.Rd +++ b/man/nest.Rd @@ -43,6 +43,7 @@ mtcars = apply_labels(mtcars, carb = "Number of carburetors" ) +data.table::setDTthreads(2) # for running on CRAN cross_cases(mtcars, cyl, am \%nest\% vs) # list of variables diff --git a/man/net.Rd b/man/net.Rd index 9a20fe6..b789d2a 100644 --- a/man/net.Rd +++ b/man/net.Rd @@ -129,6 +129,7 @@ And 'unhide' is used with 'net' when you want to show items for some nets. See examples. } \examples{ +data.table::setDTthreads(2) ol = c(1:7, 99) var_lab(ol) = "Liking" val_lab(ol) = num_lab(" diff --git a/man/significance.Rd b/man/significance.Rd index ce1a5d5..0aeefcb 100644 --- a/man/significance.Rd +++ b/man/significance.Rd @@ -390,13 +390,13 @@ mtcars = apply_labels(mtcars, carb = "Number of carburetors" ) +\dontrun{ mtcars_table = cross_cpct(mtcars, list(cyl, gear), list(total(), vs, am) ) significance_cpct(mtcars_table) -\dontrun{ # comparison with first column significance_cpct(mtcars_table, compare_type = "first_column") diff --git a/man/split_labels.Rd b/man/split_labels.Rd index fbf53ba..e0a14a0 100644 --- a/man/split_labels.Rd +++ b/man/split_labels.Rd @@ -75,6 +75,7 @@ and column names. Result of this operation is data.frame with character columns. } \examples{ +data.table::setDTthreads(2) data(mtcars) # apply labels diff --git a/man/val_lab.Rd b/man/val_lab.Rd index f2c9294..38c8562 100644 --- a/man/val_lab.Rd +++ b/man/val_lab.Rd @@ -87,6 +87,7 @@ Value labels are stored in attribute "labels" } \examples{ # toy example +data.table::setDTthreads(2) set.seed(123) # score - evaluation of tested product diff --git a/tests/testthat.R b/tests/testthat.R index f224082..2a473a5 100644 --- a/tests/testthat.R +++ b/tests/testthat.R @@ -3,5 +3,6 @@ if(capabilities('long.double')){ library(expss) options(covr = FALSE) options(width = 1000) + data.table::setDTthreads(2) testthat::test_check("expss") } \ No newline at end of file