as_GeoPackage {rolap} | R Documentation |
Save as GeoPackage
Description
Save the geolayer (geographic information layer) and the variables layer in a
file in GeoPackage
format to be able to work with other tools.
Usage
as_GeoPackage(gl, dir, name, keep_all_variables_na)
## S3 method for class 'geolayer'
as_GeoPackage(gl, dir = NULL, name = NULL, keep_all_variables_na = FALSE)
Arguments
gl |
A |
dir |
A string. |
name |
A string, file name. |
keep_all_variables_na |
A boolean, keep rows with all variables NA. |
Details
If the file name is not indicated, it defaults to the name of the geovariable.
By default, rows that are NA for all variables are eliminated.
The GeoPackage
format only allows defining a maximum of 1998 columns. If the
number of variables and columns in the geographic layer exceeds this number,
it cannot be saved in this format.
Value
A string, file name.
See Also
Other query functions:
as_geolayer()
,
filter_dimension()
,
get_layer()
,
get_variable_description()
,
get_variables()
,
run_query()
,
select_dimension()
,
select_fact()
,
set_layer()
,
set_variables()
,
star_query()
Examples
gl <- mrs_db_geo |>
as_geolayer()
f <- gl |>
as_GeoPackage(dir = tempdir())