my_age: Returns amount of vehicles at each age

Description Usage Arguments Value Examples

View source: R/my_age.R

Description

my_age returns amount of vehicles at each age using a numeric vector.

Usage

1
my_age(x, y, name = "veh", k = 1, net, message = TRUE)

Arguments

x

Numeric; vehicles by street (or spatial feature).

y

Numeric; vehicles by age of use

name

of vehicle assigned to columns of dataframe.

k

multiplication factor.

net

SpatialLinesDataFrame or Spatial Feature of "LINESTRING"

message

message with average age and total numer of vehicles.

Value

dataframe of age distrubution of vehicles.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
{
data(net)
dpc <- c(seq(1,20,3), 20:10)
PC_E25_1400 <- my_age(x = net$ldv, y = dpc, name = "PC_E25_1400")
class(PC_E25_1400)
plot(PC_E25_1400)
PC_E25_1400sf <- my_age(x = net$ldv, y = dpc, name = "PC_E25_1400", net = net)
class(PC_E25_1400sf)
plot(PC_E25_1400sf)
PC_E25_1400nsf <- sf::st_set_geometry(PC_E25_1400sf, NULL)
class(PC_E25_1400nsf)
}

ibarraespinosa/vein documentation built on July 22, 2018, 2:44 a.m.