Write a GeoLocator Data Package to disk with
frictionless::write_package(). Standard datapackage files are written from
the package descriptor and resources, while pkg$params is written
separately to params.json when it is not empty, and declared as the
params resource of the package.
params.json is plain JSON, one object per parameter list, readable without
R. JSON has no R types, so reading it back with read_gldp() returns:
numbers to 15 significant digits;
dates and times as ISO 8601 text, in UTC and to the second;
version numbers (e.g.
GeoPressureR_version) as text;functions and unevaluated calls as their R source text;
a scalar
NA, andNAin text, as the text"NA"(numeric vectors of length > 1 keep it), and a text"Inf","-Inf"or"NaN"of length 1 as a number;a vector or column of missing values only as logical;
empty vectors as empty lists, and atomic vectors without their names;
objects without their R class (such as
param,twl_calibor glue text), and factors as text.
Data frames, such as tag_set_map$known, NULL values, logical, integer and
double types, and the length of vectors are kept.
Arguments
- pkg
A GeoLocator Data Package object.
- directory
Directory where
datapackage.jsonand resources are written.- compress
Logical. Passed to
frictionless::write_package().
See also
create_gldp() to create a package and read_gldp() to read one
back from disk.
