Skip to content

Commit 728813b

Browse files
address CRAN comments
1 parent 336151b commit 728813b

10 files changed

+23
-21
lines changed

DESCRIPTION

-1
Original file line numberDiff line numberDiff line change
@@ -68,6 +68,5 @@ VignetteBuilder:
6868
knitr
6969
Encoding: UTF-8
7070
Language: en-US
71-
LazyData: true
7271
RoxygenNote: 7.1.1.9001
7372
Config/testthat/edition: 3

R/cor_test.R

+3-3
Original file line numberDiff line numberDiff line change
@@ -45,8 +45,8 @@
4545
#' redundant. Nonetheless, it is an easy option to increase the robustness of the
4646
#' correlation as well as flexible way to obtain Bayesian or multilevel
4747
#' Spearman-like rank correlations.
48-
#' @param robust Old name for \code{ranktransform}. Will be removed in subsequent
49-
#' versions, so better to use \code{ranktransform} which is more explicit about
48+
#' @param robust Old name for \code{ranktransform}. Will be removed in subsequent
49+
#' versions, so better to use \code{ranktransform} which is more explicit about
5050
#' what it does.
5151
#' @param winsorize Another way of making the correlation more "robust" (i.e.,
5252
#' limiting the impact of extreme values). Can be either \code{FALSE} or a
@@ -138,7 +138,7 @@ cor_test <- function(data,
138138
...) {
139139

140140
# Deprecation warnings
141-
if(!is.null(robust)) {
141+
if (!is.null(robust)) {
142142
warning("The 'robust' argument is deprecated in favour of 'ranktransform' (more explicit). Please use the latter instead to remove this warning.")
143143
ranktransform <- robust
144144
}

R/correlation.R

+1-1
Original file line numberDiff line numberDiff line change
@@ -252,7 +252,7 @@ correlation <- function(data,
252252
...) {
253253

254254
# Deprecation warnings
255-
if(!is.null(robust)) {
255+
if (!is.null(robust)) {
256256
warning("The 'robust' argument is deprecated in favour of 'ranktransform' (more explicit). Please use the latter instead to remove this warning.")
257257
ranktransform <- robust
258258
}

cran-comments.md

+2
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,8 @@
77

88
0 errors | 0 warnings | 0 note
99

10+
* Fixes `NOTE`s and `WARNING`s in `R CMD CHECK` for last released version.
11+
1012
## revdepcheck results
1113

1214
We checked 4 reverse dependencies, comparing R CMD check results across CRAN and

inst/WORDLIST

+1-1
Original file line numberDiff line numberDiff line change
@@ -62,6 +62,7 @@ dichotomously
6262
doi
6363
easystats
6464
et
65+
favour
6566
favours
6667
fieller
6768
frac
@@ -82,7 +83,6 @@ pracma
8283
ressembles
8384
rmarkdown
8485
semipartial
85-
severly
8686
spearman
8787
tetrachoric
8888
th

man/cor_test.Rd

+2-2
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

man/correlation.Rd

+2-2
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

tests/testthat/test-display_print_matrix.R

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
if (require("testthat") && require("gt") && require("dplyr")) {
1+
if (require("testthat") && require("gt") && require("dplyr")) {
22

33
# display and print method works - markdown -----------------------------
44

vignettes/multilevel.Rmd

+4-4
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,9 @@ bibliography: bibliography.bib
1919

2020
This vignette can be cited as:
2121

22-
Makowski, D., Ben-Shachar, M. S., Patil, I., & Lüdecke, D. (2019). Methods
23-
and Algorithms for Correlation Analysis in R. _Journal of Open Source Software_, _5_(51), 2306. doi:10.21105/joss.02306
22+
```{r cite}
23+
citation("correlation")
24+
```
2425

2526
---
2627

@@ -102,8 +103,7 @@ ggplot(data, aes(x = V1, y = V2)) +
102103
```
103104

104105
Mmh, interesting. It seems like, for each subject, the relationship is
105-
different. The negative general trend seems to be created by **differences
106-
between the groups** and could be spurious!
106+
different. The (global) negative trend seems to be an artifact of **differences between the groups** and could be spurious!
107107

108108
**Multilevel *(as in multi-group)* ** correlations allow us to account for
109109
**differences between groups**. It is based on a partialization of the group,

vignettes/types.Rmd

+7-6
Original file line numberDiff line numberDiff line change
@@ -42,16 +42,17 @@ if (!requireNamespace("see", quietly = TRUE) ||
4242

4343
This vignette can be cited as:
4444

45-
Makowski, D., Ben-Shachar, M. S., Patil, I., & Lüdecke, D. (2019). Methods
46-
and Algorithms for Correlation Analysis in R. _Journal of Open Source Software_, _5_(51), 2306. doi:10.21105/joss.02306
45+
```{r cite}
46+
citation("correlation")
47+
```
4748

4849
---
4950

5051
## Different Methods for Correlations
5152

5253
Correlations tests are arguably one of the most commonly used statistical
5354
procedures, and are used as a basis in many applications such as exploratory
54-
data analysis, structural modelling, data engineering etc. In this context, we
55+
data analysis, structural modeling, data engineering, etc. In this context, we
5556
present **correlation**, a toolbox for the R language [@Rteam] and part of the
5657
[**easystats**](https://github.com/easystats/easystats) collection, focused on
5758
correlation analysis. Its goal is to be lightweight, easy to use, and allows for
@@ -130,7 +131,7 @@ binary variable is assumed to have an underlying continuity. For example,
130131
anxiety level can be measured on a continuous scale, but can be classified
131132
dichotomously as high/low.
132133

133-
- **Winsorized correlation**: Correlation of variables that have been formerly
134+
- **Winsorized correlation**: Correlation of variables that have been
134135
Winsorized, i.e., transformed by limiting extreme values to reduce the effect of
135136
possibly spurious outliers.
136137

@@ -141,7 +142,7 @@ distributed continuous latent variables, from two observed ordinal variables.
141142
applicable when both observed variables are dichotomous.
142143

143144
- **Partial correlation**: Correlation between two variables after adjusting for
144-
the (linear) the effect of one or more variables. The correlation test is here
145+
the (linear) effect of one or more variables. The correlation test is
145146
run after having partialized the dataset, independently from it. In other words,
146147
it considers partialization as an independent step generating a different
147148
dataset, rather than belonging to the same model. This is why some discrepancies
@@ -154,7 +155,7 @@ $$r_{xy.z} = r_{e_{x.z},e_{y.z}}$$
154155

155156
- **Multilevel correlation**: Multilevel correlations are a special case of
156157
partial correlations where the variable to be adjusted for is a factor and is
157-
included as a random effect in a mixed model.
158+
included as a random effect in a mixed-effects model.
158159

159160
## Comparison
160161

0 commit comments

Comments
 (0)