Skip to content

Commit 4632dd4

Browse files
committed
make select more robust to empty SE
1 parent ea293bb commit 4632dd4

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

R/dplyr_methods.R

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1100,7 +1100,11 @@ select.SummarizedExperiment <- function(.data, ...) {
11001100
# See if join done by sample, feature or both
11011101
columns_query =
11021102
.data %>%
1103-
.[1,1, drop=FALSE] |>
1103+
1104+
{
1105+
if(ncol(.) > 0) .[1,1, drop=FALSE]
1106+
else (.)
1107+
} |>
11041108
as_tibble() |>
11051109
select_helper(...) |>
11061110
colnames()

0 commit comments

Comments
 (0)