Browse code

Import viridis color from scales package using viridis_pal to suppress build warning

Jaehyun Joo authored on 03/04/2023 13:46:24
Showing 5 changed files

... ...
@@ -1,6 +1,6 @@
1 1
 Package: qmtools
2 2
 Title: Quantitative Metabolomics Data Processing Tools
3
-Version: 1.3.1
3
+Version: 1.3.2
4 4
 Authors@R: c(
5 5
     person(given = "Jaehyun",
6 6
            family = "Joo",
... ...
@@ -70,11 +70,7 @@ plotCorr <- function(x, i,
70 70
                              "pairwise.complete.obs"),
71 71
                      method = c("pearson", "kendall", "spearman"),
72 72
                      dendrogram = TRUE,
73
-                     colors = viridis::viridis(
74
-                                           n = 256, alpha = 1,
75
-                                           begin = 0, end = 1,
76
-                                           option = "viridis"
77
-                                       ),
73
+                     colors = scales::viridis_pal()(256),
78 74
                      label = FALSE, digits = 2,
79 75
                      widths = c(0.8, 0.2), heights = c(0.2, 0.8),
80 76
                      hide_colorbar = FALSE,
... ...
@@ -58,7 +58,7 @@
58 58
 plotMiss <- function(x, i, group,
59 59
                      dendrogram_row = TRUE,
60 60
                      dendrogram_col = FALSE,
61
-                     colors = viridis::viridis(2),
61
+                     colors = scales::viridis_pal()(2),
62 62
                      hide_colorbar = TRUE,
63 63
                      showticklabels = c(TRUE, FALSE),
64 64
                      row_dend_left = FALSE,
... ...
@@ -13,7 +13,7 @@ plotCorr(
13 13
     "pairwise.complete.obs"),
14 14
   method = c("pearson", "kendall", "spearman"),
15 15
   dendrogram = TRUE,
16
-  colors = viridis::viridis(n = 256, alpha = 1, begin = 0, end = 1, option = "viridis"),
16
+  colors = (scales::viridis_pal())(256),
17 17
   label = FALSE,
18 18
   digits = 2,
19 19
   widths = c(0.8, 0.2),
... ...
@@ -10,7 +10,7 @@ plotMiss(
10 10
   group,
11 11
   dendrogram_row = TRUE,
12 12
   dendrogram_col = FALSE,
13
-  colors = viridis::viridis(2),
13
+  colors = (scales::viridis_pal())(2),
14 14
   hide_colorbar = TRUE,
15 15
   showticklabels = c(TRUE, FALSE),
16 16
   row_dend_left = FALSE,