Skip to content

Instantly share code, notes, and snippets.

@zeehio
Created September 19, 2023 10:05
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save zeehio/ce652c6ddf671998417b3fe5fb4eb241 to your computer and use it in GitHub Desktop.
Save zeehio/ce652c6ddf671998417b3fe5fb4eb241 to your computer and use it in GitHub Desktop.
DelayedArray issue to be tested on main
reprex::reprex({
library(DelayedArray)
x <- DelayedArray(matrix(1L, nrow = 2, ncol = 1))
colnames(x) <- "potato"
# wrong:
df <- as.data.frame(x, drop = TRUE)
colnames(df)
# workaround:
df2 <- as.data.frame(as.array(x, drop = FALSE))
colnames(df2)
})
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment