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

read_resource() should be able to handle NULL values from inline data #247

Open
sannegovaert opened this issue Jul 10, 2024 · 0 comments
Open
Labels
enhancement New feature or request function:read_resource Function read_resource()

Comments

@sannegovaert
Copy link
Contributor

sannegovaert commented Jul 10, 2024

Null values from inline data in datapackage.json are seen as empty objects in r.
So in this case read_resource() gives the following error:

Error in (function (..., deparse.level = 1, make.row.names = TRUE, stringsAsFactors = FALSE,  : 
  invalid list argument: all variables should have the same length

Here is the code where the bug occurs:

df <- dplyr::as_tibble(do.call(rbind.data.frame, resource$data))

read_resource() should be able to handle NULL values from inline data by replacing NULL values with NA.

@peterdesmet peterdesmet added enhancement New feature or request function:read_resource Function read_resource() labels Jul 10, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request function:read_resource Function read_resource()
Projects
None yet
Development

No branches or pull requests

2 participants