Learn R Programming

glottospace (version 0.0.112)

glottosave: Save glottodata, maps and plots

Description

If no filename is provided, the name of the glottodata object will be used.

Usage

glottosave(glottodata, filename = NULL)

Arguments

glottodata

User-provided glottodata

filename

Filename either with or without file extension

Value

No object is returned, it will be save locally at the specified location

Details

If no file extension is provided, a sensible default file extension is chosen. Dynamic maps (tmap) are saved in .html format, static maps (tmap) are saved as .png. Spatial data (sf) are saved as geopackage (.GPKG) by default, but .shp is also possible.

See Also

glottoget_glottodata

Other <glottodata>: glottoget()

Examples

Run this code
# NOT RUN {
glottodata <- glottoget("demodata", meta = FALSE)
# Saves as .xlsx
glottosave(glottodata, filename = file.path(tempdir(), "glottodata") )

glottospacedata <- glottospace(glottodata)
# Saves as .GPKG
glottosave(glottodata, filename = file.path(tempdir(), "glottodata") )

glottomap <- glottomap(glottodata)
# Saves as .png
glottosave(glottomap, filename = file.path(tempdir(), "glottomap") )

# Saves as .html
glottomap <- glottomap(glottodata, type = "dynamic",
             filename = file.path(tempdir(), "glottomap") )
# }

Run the code above in your browser using DataLab