fix memory leaks on EMGLLF, test OK for EMGrank
[valse.git] / R / generateIOdefault.R
index fc01cd8..b0d748a 100644 (file)
@@ -1,10 +1,17 @@
+#' Generate a sample of (X,Y) of size n with default values
+#' @param n sample size
+#' @param p number of covariates
+#' @param m size of the response
+#' @param k number of clusters
+#' @return list with X and Y
+#' @export
+#-----------------------------------------------------------------------
 generateIOdefault = function(n, p, m, k)
 {
-       covX = array(0, dim=c(p,p,k))
+       covX = diag(p)
        covY = array(0, dim=c(m,m,k))
        for(r in 1:k)
        {
-               covX[,,r] = diag(p)
                covY[,,r] = diag(m)
        }