Skip to content

Conversation

@baylinux01
Copy link

This PR introduces a new exported function write_corr_coef_obj_to_csv() that saves both the correlation matrix and the corresponding p-value matrix (returned by corr_coef()) into a single CSV file, reproducing the common six-block manual workflow:

  1. Header
  2. Correlation header + matrix
  3. Empty line
  4. p-value header + matrix

Changes:

-R/write_corr_coef_obj_to_csv.R: new file
-NAMESPACE: added importFrom(utils, write.csv)
-man/write_corr_coef_obj_to_csv.Rd: auto-generated documentation

R CMD check:

-0 errors / 0 warnings / 0 notes related to this PR
-Pre-existing ggplot2 linewidth issue in mgidi examples remains (unrelated)

Usage example:

library(metan)
cc <- corr_coef(df, c(v1, v2, v3))
write_corr_coef_obj_to_csv(cc, "my_corr")

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant