Learn R Programming

vein (version 0.6.0)

age_ldv: Returns amount of vehicles at each age

Description

age_ldv returns amount of vehicles at each age

Usage

age_ldv(x, name = "age", a = 1.698, b = -0.2, agemin = 1,
  agemax = 50, k = 1, bystreet = F, net, message = TRUE)

Arguments

x

Numeric; numerical vector of vehicles with length equal to lines features of raod 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

Integer; 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"

message

Logical; message with average age and total numer of vehicles

Value

dataframe of age distrubution of vehicles

Examples

Run this code
# NOT RUN {
{
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)
}
# }

Run the code above in your browser using DataLab