Skip to content

Commit 13cbb0f

Browse files
committed
Need to test size before subsetting
1 parent 32dbb32 commit 13cbb0f

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

R/multinom_reg.R

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -180,11 +180,10 @@ organize_multnet_class <- function(x, object) {
180180

181181
#' @importFrom vctrs vec_size
182182
organize_multnet_prob <- function(x, object) {
183-
x <- x[,,1]
184183
if (vec_size(x) > 1) {
185-
x <- as_tibble(x)
184+
x <- as_tibble(x[,,1])
186185
} else {
187-
x <- tibble::as_tibble_row(x)
186+
x <- tibble::as_tibble_row(x[,,1])
188187
}
189188
x
190189
}

0 commit comments

Comments
 (0)