Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

write_*()⁠ family doesn't error when writing list column #1572

Open
heliconone opened this issue Feb 13, 2025 · 0 comments
Open

write_*()⁠ family doesn't error when writing list column #1572

heliconone opened this issue Feb 13, 2025 · 0 comments

Comments

@heliconone
Copy link

The write_*() family of functions currently do not error when the data contains a list column (#938). Trying to write a matrix column however does still give the expected error.

library(tibble)
library(readr) # readr 2.15 & 2.1.5.9000

# List column doesn't error - file is written with an empty column 
tibble(id = 1:3, 
       x = lapply(1:3, seq)) |> 
  write_csv("file1.csv")

# Matrix column errors as expected
tibble(id = 1:3, 
       x = matrix(1:3, 3)) |> 
  write_csv("file1.csv")
#> Error in `cli_block()`:
#> ! `x` must not contain list or matrix columns:
#> ✖ invalid columns at index(s): 2
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant