Browse code

avoiding warnings, always a good thing

Federico Marini authored on 25/09/2024 16:46:48
Showing 1 changed files

... ...
@@ -42,7 +42,7 @@ pair_corr <- function(df, log = FALSE, method = "pearson", use_subset = TRUE) {
42 42
   title <- "Pairwise Correlations"
43 43
   # Modified from R pairs() documentation
44 44
   panel.cor <- function(x, y, digits = 2, prefix = "", cex.cor, ...) {
45
-    usr <- par("usr"); on.exit(par(usr))
45
+    usr <- par("usr"); on.exit(par(usr = usr))
46 46
     par(usr = c(0, 1, 0, 1))
47 47
     r <- abs(cor(x, y, method = method))
48 48
     txt <- format(c(r, 0.123456789), digits = digits)[1]