When resource metadata is given as a list, there is no guarantee that each resource defines exactly the same set of metadata. Some resources may define additional metadata.
When the list of resource is converted to a data.frame internally, additional metadata defined in some resources but not others should be handled as follows:
The additional metadata creates a column in the 1-row data.frame of the corresponding resource
When all the 1-row data.frames are combined, that column should be filled with NA for resources that haven't defined it.
Write a unit test that checks it does indeed work as expected
Context
Provide some context for your bug report or feature request. This could be the:
## prompt an error
stop('hola')
## check the error trace
traceback()
Small reproducible example
If you copy the lines of code that lead to your error, you can then run reprex::reprex() which will create a small website with code you can then easily copy-paste here in a way that will be easy to work with later on.
## prompt an error
stop('hola')
#> Error in eval(expr, envir, enclos): hola
## check the error trace
traceback()
#> No traceback available
R session information
Remember to include your full R session information.
options(width = 120)
sessioninfo::session_info()
The output of sessioninfo::session_info() includes relevant GitHub installation information and other details that are missed by sessionInfo().
When resource metadata is given as a list, there is no guarantee that each resource defines exactly the same set of metadata. Some resources may define additional metadata. When the
list
of resource is converted to adata.frame
internally, additional metadata defined in some resources but not others should be handled as follows:data.frame
of the corresponding resourcedata.frame
s are combined, that column should be filled withNA
for resources that haven't defined it.Write a unit test that checks it does indeed work as expected
Context
Provide some context for your bug report or feature request. This could be the:
Code
Include the code you ran and comments
Small reproducible example
If you copy the lines of code that lead to your error, you can then run
reprex::reprex()
which will create a small website with code you can then easily copy-paste here in a way that will be easy to work with later on.R session information
Remember to include your full R session information.
The output of
sessioninfo::session_info()
includes relevant GitHub installation information and other details that are missed bysessionInfo()
.