From fb7137d8b4d1ae41af5290ba62830cd0dc4057e8 Mon Sep 17 00:00:00 2001 From: "Mattan S. Ben-Shachar" <35330040+mattansb@users.noreply.github.com> Date: Tue, 18 Oct 2022 12:52:09 +0300 Subject: [PATCH] fix CRAN unicode issue (#521) --- DESCRIPTION | 2 +- NEWS.md | 2 +- R/is_effectsize_name.R | 91 +----------------------------- R/sysdata.rda | Bin 0 -> 1145 bytes WIP/convert_stat_H.R | 18 ++++++ data-raw/es_info.R | 73 ++++++++++++++++++++++++ dev/rhub.R | 5 ++ man/es_info.Rd | 16 ------ tests/testthat/test-eta_squared.R | 5 +- tests/testthat/test-print.R | 5 +- vignettes/anovaES.Rmd | 9 ++- 11 files changed, 113 insertions(+), 113 deletions(-) create mode 100644 R/sysdata.rda create mode 100644 WIP/convert_stat_H.R create mode 100644 data-raw/es_info.R create mode 100644 dev/rhub.R delete mode 100644 man/es_info.Rd diff --git a/DESCRIPTION b/DESCRIPTION index 7331d1d9d..f089fbf5f 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -1,7 +1,7 @@ Type: Package Package: effectsize Title: Indices of Effect Size -Version: 0.8.0.0001 +Version: 0.8.1 Authors@R: c(person(given = "Mattan S.", family = "Ben-Shachar", diff --git a/NEWS.md b/NEWS.md index d439dcd92..7629b531c 100644 --- a/NEWS.md +++ b/NEWS.md @@ -1,4 +1,4 @@ -# effectsize 0.8.0.0001 +# effectsize 0.8.1 ## Changes diff --git a/R/is_effectsize_name.R b/R/is_effectsize_name.R index 3609d84b6..57e293767 100644 --- a/R/is_effectsize_name.R +++ b/R/is_effectsize_name.R @@ -42,99 +42,12 @@ get_effectsize_label <- function(x, ignore_case = TRUE, use_symbols = getOption( # es_info ----------------------------------------------------------------- - -#' List of effect size names -#' -#' Can always add more info here if need be... -#' -#' @keywords internal -es_info <- matrix( - c( - ## Diffs - "Cohens_d", "Cohen's d", NA, "twotail", -Inf, Inf, 0, - "Hedges_g", "Hedges' g", NA, "twotail", -Inf, Inf, 0, - "Glass_delta", "Glass' delta", "Glass' \u0394", "twotail", -Inf, Inf, 0, - "Mahalanobis_D", "Mahalanobis' D", NA, "onetail", 0, Inf, 0, - - ## xtab cor - "Cramers_v", "Cramer's V", NA, "onetail", 0, 1, 0, - "Cramers_v_adjusted", "Cramer's V (adj.)", NA, "onetail", 0, 1, 0, - "Tschuprows_t", "Tschuprow's T", NA, "onetail", 0, 1, 0, - "phi", "Phi", "\u03D5", "onetail", 0, 1, 0, - "phi_adjusted", "Phi (adj.)", "\u03D5 (adj.)", "onetail", 0, 1, 0, - "Pearsons_c", "Pearson's C", NA, "onetail", 0, 1, 0, - "Cohens_w", "Cohen's w", NA, "onetail", 0, Inf, 0, - "Fei", "Fei", "\u05E4\u200E", "onetail", 0, 1, 0, - - ## xtab 2x2 - "Cohens_h", "Cohen's h", NA, "twotail", -pi, pi, 0, - "Odds_ratio", "Odds ratio", NA, "twotail", 0, Inf, 1, - "log_Odds_ratio", "log(Odds ratio)", NA, "twotail", -Inf, Inf, 0, - "Risk_ratio", "Risk ratio", NA, "twotail", 0, Inf, 1, - "log_Risk_ratio", "log(Risk ratio)", NA, "twotail", -Inf, Inf, 0, - - ## xtab dep - "Cohens_g", "Cohen's g", NA, "onetail", -0.5, 0.5, 0, - - ## ANOVA - "Eta2", "Eta2", "\u03B7\u00b2", "onetail", 0, 1, 0, - "Eta2_partial", "Eta2 (partial)", "\u03B7\u00b2 (partial)", "onetail", 0, 1, 0, - "Eta2_generalized", "Eta2 (generalized)", "\u03B7\u00b2 (generalized)", "onetail", 0, 1, 0, - "Epsilon2", "Epsilon2", "\u03B5\u00b2", "onetail", 0, 1, 0, - "Epsilon2_partial", "Epsilon2 (partial)", "\u03B5\u00b2 (partial)", "onetail", 0, 1, 0, - "Omega2", "Omega2", "\u03C9\u00b2", "onetail", 0, 1, 0, - "Omega2_partial", "Omega2 (partial)", "\u03C9\u00b2 (partial)", "onetail", 0, 1, 0, - "Cohens_f", "Cohen's f", NA, "onetail", 0, Inf, 0, - "Cohens_f_partial", "Cohen's f (partial)", NA, "onetail", 0, Inf, 0, - "Cohens_f2", "Cohen's f2", "Cohen's f\u00b2", "onetail", 0, Inf, 0, - "Cohens_f2_partial", "Cohen's f2 (partial)", "Cohen's f\u00b2 (partial)", "onetail", 0, Inf, 0, - - ## Rank - "r_rank_biserial", "r (rank biserial)", NA, "twotail", -1, 1, 0, - "Kendalls_W", "Kendall's W", NA, "onetail", 0, 1, 0, - "rank_epsilon_squared", "Epsilon2 (rank)", "\u03B5\u00b2(R)", "onetail", 0, 1, 0, - "rank_eta_squared", "Eta2 (rank)", "\u03B7\u00b2(H)", "onetail", 0, 1, 0, - - ## CLES - "p_superiority", "Pr(superiority)", NA, "twotail", 0, 1, 0.5, - "WMW_odds", "WMW Odds", NA, "twotail", 0, Inf, 1, - "Cohens_U1", "Cohen's U1", NA, "onetail", 0, 1, 0, - "Cohens_U2", "Cohen's U2", NA, "onetail", 0.5, 1, 0.5, - "Cohens_U3", "Cohen's U3", NA, "twotail", 0, 1, 0.5, - "overlap", "Overlap", NA, "onetail", 0, 1, 1, - - ## Other - "r", "r", NA, "twotail", -1, 1, 0, - "d", "d", NA, "twotail", -Inf, Inf, 0, - - ## Std Coefficient - "Std_Coefficient", "Coefficient (std.)", NA, "twotail", -Inf, Inf, 0, - "Std_Odds_ratio", "Odds Ratio (std.)", NA, "twotail", 0, Inf, 1, - "Std_Risk_ratio", "Risk Ratio (std.)", NA, "twotail", 0, Inf, 1, - "Std_IRR", "IRR (std.)", "twotail", NA, 0, Inf, 1, - "Std_Median", "Median (std.)", NA, "twotail", -Inf, Inf, 0, - "Std_Mean", "Mean (std.)", NA, "twotail", -Inf, Inf, 0, - "Std_MAP", "MAP (std.)", NA, "twotail", -Inf, Inf, 0 - ), - ncol = 7, byrow = TRUE, - dimnames = list(NULL, c("name", "label", "symbol", "direction", "lb", "ub", "null")) -) -es_info <- as.data.frame(es_info, stringsAsFactors = FALSE) -es_info$lb <- as.numeric(es_info$lb) -es_info$ub <- as.numeric(es_info$ub) -es_info$null <- as.numeric(es_info$null) -es_info$symbol[is.na(es_info$symbol)] <- es_info$label[is.na(es_info$symbol)] -rownames(es_info) <- es_info$name - +# See data-raw/es_info.R # Utils ------------------------------------------------------------------- #' @keywords internal .resolve_use_symbols <- function(use_symbols) { - use_symbols && - !( - (Sys.info()["sysname"] == "windows" || grepl("^mingw", R.version$os)) && - getRversion() < "4.2" - ) + use_symbols && l10n_info()[["UTF-8"]] } diff --git a/R/sysdata.rda b/R/sysdata.rda new file mode 100644 index 0000000000000000000000000000000000000000..373d65528f8aa4c6bc0bc1598ec8ad2d3bc2b2f8 GIT binary patch literal 1145 zcmV-<1cv)UT4*^jL0KkKSv}iUt^fthfB*mg{#0P&cmVJE-_XDR|FFO@1^@&A5`fSF zfPhc{Knc(V9s%Su002E~86>Bv>H`s`hKABH0iYNmqamXcPgB%sqeegnsMv=913{sn z&;h1Fp^!At00EEzkQo35o~f#U4FCp>0000q4GfHifBrMxL5Yg*;6|)b$=v0jK=` zY7&(aY^b$Gb!~~ksB6t6mQ+PjQfHxQLx&}i6UloYUmxcgc!!lcf&R#&N? z8G|2&OE{Vnsg;#;Gwx+sSSjgZmwzS~#ca+g%~1*X$r4bKEm160Qb4L`5E5ER2crbW zHXs^eLTx6}2E-)BkdtD6Jk?;1_8_ldjdailc9ZK==GngH&0Do&U}^JjOZ{=HZ{uH>z}9*Z-zH##`1x}3&`or5BlZ#UUm84En~Uen0* zni#ihfzFydzR9fC%E;DPnWW!csLcD@&U< z)jBI5B9F+(WJ-P~%JVQC`83L^DMxdlbB+T5n}UABY~CwP3VB%+rO}*w%nd|dGUN_Y zi{rW9H8|hW>&WYM3!uJc?4A(KzWQ@yVs`NwnI`Ikk=e+;E-~o$zZcS^7+dqbhr6 zt32o=e>0?6BjPvNj(Nm%PO*Y!K1{5#B{meL8xFCDiy@Izt>KDY%H1+9;xQy~YgIi) z)Zb1t<5Y@N&}%U>gy4ppVKSL`M_89S#se#TMG8%fGqqkMSly+l!9?YwXw~jNMh9Mw z(b_Y^J52hqb<&Zlg)m5{etmqH3?xmgQe7^hG1-t!^JCI&iX?2w&tVRfiDl2KBJGi= z?lYsPjuY~`s~+h$+h=I`*FOW1W1r3%O}B;MSe=2--!_LCM`7Egj0D}Yu6Y!qN-3F! z3bUe|iY}yJrDB|pfrG+kG(w4itkWCOIE$?MY}z$UW2RA+iwq3N5HbNE1c4zH?3>Lq z38aif?DZlwp98bEnC3piaNBlVcU9-j1Ry{d#RCwL>*k^b5=-v|c)YNE@1)!w5_vnu??nfan3?2$jNqKMT6VqY9N)|BJaI LoG3^h?W