frictionless-r icon indicating copy to clipboard operation
frictionless-r copied to clipboard

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

Open sannegovaert opened this issue 1 year ago • 0 comments

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: https://github.com/frictionlessdata/frictionless-r/blob/27a5c692a39a633698929c7decbf3ad686761237/R/read_resource.R#L341

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

sannegovaert avatar Jul 10 '24 13:07 sannegovaert