aboutsummaryrefslogtreecommitdiff
path: root/R/unmarkedFrame.R
diff options
context:
space:
mode:
Diffstat (limited to 'R/unmarkedFrame.R')
-rw-r--r--R/unmarkedFrame.R5
1 files changed, 1 insertions, 4 deletions
diff --git a/R/unmarkedFrame.R b/R/unmarkedFrame.R
index c936bdf..b97f23b 100644
--- a/R/unmarkedFrame.R
+++ b/R/unmarkedFrame.R
@@ -1133,10 +1133,7 @@ setMethod("[", c("unmarkedFrame", "numeric", "missing", "missing"),
if(all(i < 0)) { # if i is negative, then convert to positive
i <- (1:M)[i]
}
- y <- getY(x)[i,]
- if (length(i) == 1) {
- y <- t(y)
- }
+ y <- getY(x)[i,,drop=FALSE]
siteCovs <- siteCovs(x)
obsCovs <- obsCovs(x)
if (!is.null(siteCovs)) {