emis4d: Estimation of emissions resulting in a 3D EmissionsArray

Description Usage Arguments Examples

View source: R/emis4d.R

Description

emis3d emissions

Usage

1
emis4d(veh, lkm, ef, profile)

Arguments

veh

data.frame or matrix similar to object class "Vehicles"

lkm

Numeric, with length equal to number of rows of veh

ef

EmissionFactor with mode double, with length equal to number of columns of veh,

profile

data.frame with rows as 24 hours and columnas as each dayfor extrapolating traffic.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
## Not run: 
#do not run
library(vein)
data(net)
data(pc_profile)
data(fkm)
PC_G <- c(33491,22340,24818,31808,46458,28574,24856,28972,37818,49050,87923,
         133833,138441,142682,171029,151048,115228,98664,126444,101027,
         84771,55864,36306,21079,20138,17439, 7854,2215,656,1262,476,512,
         1181, 4991, 3711, 5653, 7039, 5839, 4257,3824, 3068)
pc1 <- my_age(x = net$ldv, y = PC_G, name = "PC", agemax = 41)
lef <- ef_cetesb("CO", "PC_G", agemax = 41)
system.time(E_CO <- emis(veh = pc1,
                         lkm = net$lkm,
                         ef = lef,
                         profile = pc_profile))
system.time(  E_COs <- emis(veh = pc1,
                            lkm = net$lkm,
                            ef = lef,
                            profile = pc_profile,
                            simplify = T) )
system.time( df <- emis4d(veh = pc1,
                          lkm = net$lkm,
                          ef = lef,
                          profile = pc_profile) )
system.time( df <- emis3d(veh = pc1,
                          lkm = net$lkm,
                          ef = lef,
                          profile = pc_profile) )
veh <- rep(1, 4)
lkm = rep(1, 2)
ef = c(1, 2)
profile = rep(1, 2)
emis3d(veh = veh, lkm = lkm, ef = ef, profile = profile)

## End(Not run)

ibarraespinosa/forvein documentation built on Dec. 23, 2019, 7:31 p.m.