Learn R Programming

eixport (version 0.4.0)

to_rline: Export emissions to other formats

Description

Export emissions object according to format of file 'Sources.txt' of the model R-LINE

Usage

to_rline(X_b, Y_b, Z_b, X_e, Y_e, Z_e, dCL, sigmaz0, lanes, Emis, Hw1, dw1,
  Hw2, dw2, Depth, Wtop, Wbottom, experimental = FALSE)

Arguments

X_b

initial x coordinates.

Y_b

initial y coordinates.

Z_b

initial meters above sea level (m).

X_e

final x coordinates.

Y_e

final y coordinates.

Z_e

final meters above sea level (m).

dCL

offset distance for each source relative to the centerline.

sigmaz0

vertical dispersion (m).

lanes

number of lanes at each street.

Emis

Column with the emissions whose unit must be g/ms.

Hw1

Height of the barrier 1 (m).

dw1

Distance to barrier 1 (m).

Hw2

height of the barrier 2 (m).

dw2

Distance to barrier 2 (m).

Depth

Depth of the depression. USed for depressed roadway (m).

Wtop

width of the opening at the top of the depression (m).

Wbottom

width of the roadway at the bottom of the depression (m).

experimental

Boolean argument to denote the use of the experimental features (TRUE) or not (FALSE).

Value

Data frame with format for R-LINE model.

Examples

Run this code
# NOT RUN {
# Do not run
data(emisco)
Source <- to_rline(X_b = emisco$xmin,
               Y_b = emisco$ymin,
               Z_b =0,
               X_e = emisco$xmin,
               Y_e = emisco$ymin,
               Z_e =0,
               dCL = 0,
               Emis = emisco$V8,
               sigmaz0 = 2,
               lanes = emisco$lanes)
head(Source)
write.table(x = Source, file = paste0(tempdir(), "/Sources.txt"),
row.names = FALSE, sep = " ", quote = FALSE)
# }

Run the code above in your browser using DataLab