vein (version 0.7.8)

ef_fun: Experimental: Returns a function of Emission Factor by age of use

Description

ef_fun returns amount of vehicles at each age

Usage

ef_fun(ef, type = "logistic", x = 1:length(ef), x0 = mean(ef),
  k = 1/4, L = max(ef))

Arguments

ef

Numeric; numeric vector of emission factors.

type

Character; "logistic" by default so far.

x

Numeric; vector for ages of use.

x0

Numeric; the x-value of the sigmoid's midpoint,

k

Numeric; the steepness of the curve.

L

Integer; the curve's maximum value.

Value

dataframe of age distrubution of vehicles at each street.

References

https://en.wikipedia.org/wiki/Logistic_function

Examples

Run this code
# NOT RUN {
{
data(fe2015)
CO <- vein::EmissionFactors(fe2015[fe2015$Pollutant == "CO", "PC_G"])
ef_logit <- ef_fun(ef = CO, x0 = 27, k = 0.4, L = 33)
plot(ef_logit, type = "b", pch = 16)
lines(ef_logit, pch = 16, col = "blue")
}
# }

Run the code above in your browser using DataCamp Workspace