Skip to content

Commit 11f1a67

Browse files
Upkeep
1 parent a7bfc07 commit 11f1a67

9 files changed

+45
-50
lines changed

DESCRIPTION

+4-6
Original file line numberDiff line numberDiff line change
@@ -49,14 +49,12 @@ BugReports: https://github.com/easystats/correlation/issues
4949
Depends:
5050
R (>= 3.4)
5151
Imports:
52-
bayestestR (>= 0.11.5),
52+
bayestestR (>= 0.12.1),
5353
datasets,
54-
datawizard (>= 0.4.0.16),
55-
insight (>= 0.17.0),
54+
datawizard (>= 0.4.1),
55+
insight (>= 0.17.1),
5656
parameters (>= 0.17.0),
5757
stats
58-
Remotes:
59-
easystats/datawizard
6058
Suggests:
6159
BayesFactor,
6260
poorman,
@@ -87,6 +85,6 @@ VignetteBuilder:
8785
knitr
8886
Encoding: UTF-8
8987
Language: en-US
90-
RoxygenNote: 7.1.2
88+
RoxygenNote: 7.2.0
9189
Config/testthat/edition: 3
9290
Roxygen: list(markdown = TRUE)

R/cor_lower.R

+7-7
Original file line numberDiff line numberDiff line change
@@ -7,21 +7,21 @@
77
#' @param ... Other arguments to be passed to or from other functions.
88
#'
99
#' @examples
10-
#' x <- correlation(mtcars, redundant = TRUE) # Generate full matrix
10+
#' x <- correlation(mtcars, redundant = TRUE) # Generate full matrix
1111
#' x <- cor_lower(x)
1212
#'
1313
#' if (require("ggplot2")) {
14-
#' ggplot(x, aes(x = Parameter2, y=Parameter1, fill=r)) +
14+
#' ggplot(x, aes(x = Parameter2, y = Parameter1, fill = r)) +
1515
#' geom_tile()
1616
#' }
1717
#'
1818
#' # Sorted
19-
#' x <- correlation(mtcars, redundant = TRUE) # Generate full matrix
19+
#' x <- correlation(mtcars, redundant = TRUE) # Generate full matrix
2020
#' x <- cor_sort(x)
2121
#' x <- cor_lower(x)
2222
#'
2323
#' if (require("ggplot2")) {
24-
#' ggplot(x, aes(x = Parameter2, y=Parameter1, fill=r)) +
24+
#' ggplot(x, aes(x = Parameter2, y = Parameter1, fill = r)) +
2525
#' geom_tile()
2626
#' }
2727
#' @export
@@ -42,9 +42,9 @@ cor_lower.easycorrelation <- function(x, diag = FALSE, ...) {
4242

4343
tokeep <- c()
4444

45-
for(param1 in rownames(m)) {
46-
for(param2 in colnames(m)) {
47-
if(tri[param1, param2] == TRUE) {
45+
for (param1 in rownames(m)) {
46+
for (param2 in colnames(m)) {
47+
if (tri[param1, param2] == TRUE) {
4848
tokeep <- c(tokeep, which(x$Parameter1 == param1 & x$Parameter2 == param2))
4949
}
5050
}

R/cor_test.R

+7-6
Original file line numberDiff line numberDiff line change
@@ -20,12 +20,13 @@
2020
#' factors involved, point-biserial if one dichotomous and one continuous and
2121
#' pearson otherwise). See below the **details** section for a description of
2222
#' these indices.
23-
#' @param bayesian,partial_bayesian If TRUE, will run the correlations under a
24-
#' Bayesian framework. Note that for partial correlations, you will also need
25-
#' to set `partial_bayesian` to `TRUE` to obtain "full" Bayesian
26-
#' partial correlations. Otherwise, you will obtain pseudo-Bayesian partial
27-
#' correlations (i.e., Bayesian correlation based on frequentist
28-
#' partialization).
23+
#' @param bayesian If `TRUE`, will run the correlations under a Bayesian
24+
#' framework.
25+
#' @param partial_bayesian If partial correlations under a Bayesian framework
26+
#' are needed, you will also need to set `partial_bayesian` to `TRUE` to
27+
#' obtain "full" Bayesian partial correlations. Otherwise, you will obtain
28+
#' pseudo-Bayesian partial correlations (i.e., Bayesian correlation based on
29+
#' frequentist partialization).
2930
#' @param include_factors If `TRUE`, the factors are kept and eventually
3031
#' converted to numeric or used as random effects (depending of
3132
#' `multilevel`). If `FALSE`, factors are removed upfront.

R/cor_to_pcor.R

+3-1
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,9 @@
1717
#' predictor, because it is scaled to (i.e., relative to) the total variability
1818
#' in the response variable.
1919
#'
20-
#' @param cor,pcor A correlation matrix, or a partial or a semipartial
20+
#' @param cor A correlation matrix, or a partial or a semipartial
21+
#' correlation matrix.
22+
#' @param pcor A correlation matrix, or a partial or a semipartial
2123
#' correlation matrix.
2224
#' @param cov A covariance matrix (or a vector of the SD of the variables).
2325
#' Required for semi-partial correlations.

R/methods.easycorrelation.R

-3
Original file line numberDiff line numberDiff line change
@@ -126,9 +126,6 @@ standardize_names.easycorrelation <- function(data, ...) {
126126
}
127127

128128

129-
130-
131-
132129
# Internals ---------------------------------------------------------------
133130

134131
#' @keywords internal

man/cor_lower.Rd

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

man/cor_test.Rd

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

man/cor_to_pcor.Rd

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

man/correlation.Rd

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

0 commit comments

Comments
 (0)