Learn R Programming

vein (version 0.6.0)

emis_merge: Merge several emissions files returning data-frames or 'sf' of lines

Description

emis_merge reads rds files and returns a data-frame or an object of 'spatial feature' of streets, merging several files.

Usage

emis_merge(pol = "CO", what = "STREETS.rds", streets = T, net,
  path = "emi", crs, under = "after", ignore = FALSE,
  as_list = FALSE)

Arguments

pol

Character. Pollutant.

what

Character. Word to search the emissions names, "STREETS", "DF" or whatever name. It is important to include the extension .'rds'. For instance, If you have several files "XX_CO_STREETS.rds", what should be "STREETS.rds"

streets

Logical. If true, emis_merge will read the street emissions created with emis_post by "streets_wide", returning an object with class 'sf'. If false, it will read the emissions data-frame and rbind them.

net

'Spatial feature' or 'SpatialLinesDataFrame' with the streets. It is expected #' that the number of rows is equal to the number of rows of street emissions. If #' not, the function will stop.

path

Character. Path where emissions are located

crs

coordinate reference system in numeric format from http://spatialreference.org/ to transform/project spatial data using sf::st_transform

under

"Character"; "after" when you stored your pollutant x as 'X_' "before" when '_X' and "none" for merging directly the files.

ignore

"Logical"; Would you liek your selection?

as_list

"Logical"; for returning the results as list or not.

Value

'Spatial feature' of lines or a dataframe of emissions

Examples

Run this code
# NOT RUN {
# Do not run

# }

Run the code above in your browser using DataLab