Skip to content

Commit

Permalink
Remarks regarding JOSS paper #34
Browse files Browse the repository at this point in the history
make a lot of example for corrp
  • Loading branch information
PHS-Meantrix committed Feb 18, 2025
1 parent 993074f commit 1a8762a
Show file tree
Hide file tree
Showing 2 changed files with 44 additions and 4 deletions.
24 changes: 22 additions & 2 deletions R/corrp.R
Original file line number Diff line number Diff line change
Expand Up @@ -100,10 +100,30 @@
#' Paul van der Laken, ppsr, 2021. URL: \url{https://github.com/paulvanderlaken/ppsr/}.
#'
#' @examples
#' # Usage with default settings
#' iris_c <- corrp(iris)
#' iris_m <- corr_matrix(iris_c, isig = FALSE)
#' corrplot::corrplot(iris_m)
#' iris_m <- corr_matrix(iris_c, isig = FALSE) # You can then make correlation matrix
#' corrp::corrplot(iris_m) # You can visualize the matrix using corrplot
#'
#' # Using PPS for both numeric-numeric and numeric-categorical pairs
#' iris_c1 <- corrp(iris, cor.nn = "pps", cor.nc = "pps")
#'
#' # Using Distance Correlation for numeric-numeric and Predictive Power Score for numeric-categorical
#' iris_c2 <- corrp(iris, cor.nn = "dcor", cor.nc = "pps", dcor.args = list(method = "auto"))
#'
#' # Using Maximal Information Coefficient (MIC) for numeric-numeric and Uncertainty Coefficient for categorical-categorical
#' iris_c3 <- corrp(iris, cor.nn = "mic", cor.cc = "uncoef", mic.args = list(alpha = 0.6))
#'
#' # Using PPS for all pair types
#' iris_c4 <- corrp(iris, cor.nn = "pps", cor.nc = "pps", cor.cc = "pps")
#'
#' # Using Distance Correlation for numeric-numeric, Predictive Power Score for numeric-categorical,
#' # and Uncertainty Coefficient for categorical-categorical
#' iris_c5 <- corrp(
#' iris,
#' cor.nn = "dcor", cor.nc = "pps", cor.cc = "uncoef",
#' dcor.args = list(method = "auto")
#' )
#' @export
corrp <- function(df,
parallel = TRUE,
Expand Down
24 changes: 22 additions & 2 deletions man/corrp.Rd

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

0 comments on commit 1a8762a

Please sign in to comment.