From c9ff8e76a962787a11bc5f3828eb2ab18f822134 Mon Sep 17 00:00:00 2001 From: Waldir Leoncio Date: Tue, 28 Jul 2020 15:35:29 +0200 Subject: [PATCH] Changed base Matlab function behavior --- R/cell.R | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/R/cell.R b/R/cell.R index beac532..746634e 100644 --- a/R/cell.R +++ b/R/cell.R @@ -6,10 +6,10 @@ #' @return An array of zeroes with the dimensions passed on call cell <- function(n, sz = c(n, n), ...) { if (length(sz) == 1 & missing(...)) { - return(array(dim = c(n, sz))) + return(array(0, dim = c(n, sz))) } else if (length(sz) == 2) { - return(array(dim = sz)) + return(array(0, dim = sz)) } else { - return(array(dim = c(n, sz, ...))) + return(array(0, dim = c(n, sz, ...))) } } \ No newline at end of file