vein (version 0.7.8)

age_hdv: Returns amount of vehicles at each age

Description

age_hdv returns amount of vehicles at each age

Usage

age_hdv(x, name = "age", a = 0.2, b = 17, agemin = 1,
  agemax = 50, k = 1, bystreet = F, net, verbose = FALSE, namerows)

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.

Value

dataframe of age distrubution of vehicles at each street

Examples

Run this code
# NOT RUN {
{
data(net)
LT_B5 <- age_hdv(x = net$hdv,name = "LT_B5")
plot(LT_B5)
LT_B5 <- age_hdv(x = net$hdv, name = "LT_B5", net = net)
plot(LT_B5)
}
# }

Run the code above in your browser using DataCamp Workspace