EEAaq_export {EEAaq}R Documentation

Export and save an EEAaq_df class object

Description

EEAaq_export saves an EEAaq_df class object as a .csv or a .txt file, and exports the associated shapefile as well.

Usage

EEAaq_export(data, filepath, format, shape = FALSE)

Arguments

data

an EEAaq_df class object.

filepath

character string giving the file path

format

character string giving the format of the file. It must be one of 'csv' and 'txt'.

shape

logical value (T or F). If TRUE the shapefile associated to the EEAaq_df object given in input is saved in the same directory specified in filepath. If FALSE (the default), only the data frame containing the data is saved.

Value

No return value, called for side effects.

Examples


#Download a dataset with the function EEAaq_get_data, which generate an EEAaq_df object.
data <- EEAaq_get_data(zone_name = "Milano", NUTS_level = "LAU", pollutant = "PM10",
  from = 2021, to = 2021, verbose = TRUE)
temp <- tempdir()
filepath <- paste0(temp, "/data.csv")
EEAaq_export(data = data, filepath = filepath, format = "csv", shape = TRUE)


[Package EEAaq version 0.0.3 Index]