Open
Description
When there is 1 reference, this should look like this in datapackage.json
:
"references": ["my_reference"]
However, that is not the case when writing a Data Package.
library(camtrapdp)
x <- example_dataset()
x$references <- c("my_reference")
write_camtrapdp(x, directory = "references_as_string")
In datapackage.json
, references then looks like this:
"references": "my_reference"
The IPT does not recognize this, as the square brackets are missing.
It does work when a second (empty element) is added:
x$references <- c("my_reference", "")
write_camtrapdp(x, directory = "references_as_vector")
In datapackage.json
, references then looks like this:
"references": ["my_reference", ""]
The IPT can handle this, but it genereates an empty field for reference.
unlink("references_as_string", recursive = TRUE)
unlink("references_as_vector", recursive = TRUE)
Created on 2024-11-21 with reprex v2.1.1
Metadata
Metadata
Assignees
Labels
No labels