`age_ldv`

returns amount of vehicles at each age

```
age_ldv(
x,
name = "age",
a = 1.698,
b = -0.2,
agemin = 1,
agemax = 50,
k = 1,
bystreet = F,
net,
verbose = FALSE,
namerows,
time
)
```

## Arguments

- x
Numeric; numerical vector of vehicles with length equal to lines features of road network

- name
Character; of vehicle assigned to columns of dataframe

- a
Numeric; parameter of survival equation

- b
Numeric; parameter of survival equation

- agemin
Integer; age of newest vehicles for that category

- agemax
Integer; age of oldest vehicles for that category

- k
Numeric; multiplication factor. If its length is > 1, it must match the length of x

- bystreet
Logical; when TRUE it is expecting that 'a' and 'b' are numeric vectors with length equal to x

- net
SpatialLinesDataFrame or Spatial Feature of "LINESTRING"

- verbose
Logical; message with average age and total numer of vehicles

- namerows
Any vector to be change row.names. For instance, name of
regions or streets.

- time
Character to be the time units as denominator, eg "1/h"

## Value

dataframe of age distrubution of vehicles

## Note

The functions age* produce distribution of the circulating fleet by age of use.
The order of using these functions is:

1. If you know the distribution of the vehicles by age of use , use: `my_age`

2. If you know the sales of vehicles, or the registry of new vehicles,
use `age`

to apply a survival function.
3. If you know the theoretical shape of the circulating fleet and you can use
`age_ldv`

, `age_hdv`

or `age_moto`

. For instance,
you dont know the sales or registry of vehicles, but somehow you know
the shape of this curve.
4. You can use/merge/transform/adapt any of these functions.

It consists in a Gompertz equation with default parameters from
1 national emissions inventory for green housegases in Brazil, MCT 2006

## Examples

```
if (FALSE) {
data(net)
PC_E25_1400 <- age_ldv(x = net$ldv, name = "PC_E25_1400")
plot(PC_E25_1400)
PC_E25_1400 <- age_ldv(x = net$ldv, name = "PC_E25_1400", net = net)
plot(PC_E25_1400)
}
```