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

View source: R/ef_fun.R

ef_funR Documentation

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),
  verbose = TRUE
)

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.

verbose

Logical; to show the equation.

Value

numeric vector.

References

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

Examples

## Not run: 
CO <- ef_cetesb(p = "CO", veh = "PC_G")
ef_logit <- ef_fun(ef = CO, x0 = 27, k = 0.4, L = max(CO))
df <- data.frame(CO, ef_logit)
colplot(df)

## End(Not run)

vein documentation built on May 29, 2024, 7:20 a.m.