age_moto: Returns amount of vehicles at each age

Description Usage Arguments Value Examples

View source: R/age_moto.R

Description

age_moto returns amount of vehicles at each age

Usage

1
2
age_moto(x, name = "age", a = 0.2, b = 17, 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

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

1
2
3
4
5
6
7
{
data(net)
MOTO_E25_500 <- age_moto(x = net$ldv, name = "M_E25_500", k = 0.4)
plot(MOTO_E25_500)
MOTO_E25_500 <- age_moto(x = net$ldv, name = "M_E25_500", k = 0.4, net = net)
plot(MOTO_E25_500)
}

ibarraespinosa/vein documentation built on Oct. 6, 2018, 2:07 p.m.