X-Git-Url: https://git.auder.net/?p=valse.git;a=blobdiff_plain;f=pkg%2FR%2Fplot_valse.R;h=febc65c13a717b9a2939115594370ef0465c1c8e;hp=73188d276c896c234dfe00a10149a01ab6edef65;hb=3921ba9b5ea85bcc190245ac7da9ee9da1658b9f;hpb=8b28401096c8f1b95a4d83b34b47548ae1b2a425;ds=sidebyside diff --git a/pkg/R/plot_valse.R b/pkg/R/plot_valse.R index 73188d2..febc65c 100644 --- a/pkg/R/plot_valse.R +++ b/pkg/R/plot_valse.R @@ -5,7 +5,6 @@ #' @param X matrix of covariates (of size n*p) #' @param Y matrix of responses (of size n*m) #' @param model the model constructed by valse procedure -#' @param n sample size #' @param comp TRUE to enable pairwise clusters comparison #' @param k1 index of the first cluster to be compared #' @param k2 index of the second cluster to be compared @@ -15,8 +14,9 @@ #' @importFrom reshape2 melt #' #' @export -plot_valse <- function(X, Y, model, n, comp = FALSE, k1 = NA, k2 = NA) +plot_valse <- function(X, Y, model, comp = FALSE, k1 = NA, k2 = NA) { + n <- nrow(X) K <- length(model$pi) ## regression matrices gReg <- list()