...
|
...
|
@@ -96,6 +96,7 @@ poplin_scoreplot.default <- function(x, comp = c(1, 2), group,
|
96
|
96
|
##' @export
|
97
|
97
|
poplin_scoreplot.poplin.pca <- function(x, comp = c(1, 2),
|
98
|
98
|
group, group_col = NULL,
|
|
99
|
+ xlab = NULL, ylab = NULL,
|
99
|
100
|
...) {
|
100
|
101
|
if (max(comp) > ncol(x) || length(comp) != 2) {
|
101
|
102
|
stop("Choose only two components within 1:ncol(x).")
|
...
|
...
|
@@ -122,13 +123,15 @@ poplin_scoreplot.poplin.pca <- function(x, comp = c(1, 2),
|
122
|
123
|
)
|
123
|
124
|
}
|
124
|
125
|
poplin_scoreplot.default(x = x, comp = comp, group = group,
|
125
|
|
- group_col = group_col, ...)
|
|
126
|
+ group_col = group_col,
|
|
127
|
+ xlab = xlab, ylab = ylab, ...)
|
126
|
128
|
}
|
127
|
129
|
|
128
|
130
|
##' @export
|
129
|
131
|
poplin_scoreplot.poplin.plsda <- function(x, comp = c(1, 2),
|
130
|
132
|
group = attr(x, "Y.observed"),
|
131
|
|
- group_col = NULL, ...) {
|
|
133
|
+ group_col = NULL,
|
|
134
|
+ xlab = NULL, ylab = NULL, ...) {
|
132
|
135
|
if (max(comp) > ncol(x) || length(comp) != 2) {
|
133
|
136
|
stop("Choose only two components within 1:ncol(x).")
|
134
|
137
|
}
|
...
|
...
|
@@ -153,5 +156,6 @@ poplin_scoreplot.poplin.plsda <- function(x, comp = c(1, 2),
|
153
|
156
|
prettyNum(attr(x, "explvar")[comp[2]], digits = 4), "%)")
|
154
|
157
|
}
|
155
|
158
|
poplin_scoreplot.default(x = x, comp = comp, group = group,
|
156
|
|
- group_col = group_col, ...)
|
|
159
|
+ group_col = group_col,
|
|
160
|
+ xlab = xlab, ylab = ylab, ...)
|
157
|
161
|
}
|