Learn R Programming

vein (version 0.6.0)

Vehicles: Construction function for class "Vehicles"

Description

Vehicles returns a tranformed object with class "Vehicles" and units 1/h. The type of objects supported are of classes "matrix", "data.frame", "numeric" and "array". If the object is a matrix it is converted to data.frame. If the object is "numeric" it is converted to class "units". The function emis_paved needs veh to be an array, therefore in this case, veh must be an array in the total fleet at each street and dimensions total fleet, hours and days

Usage

Vehicles(x, ...)

# S3 method for Vehicles print(x, ...)

# S3 method for Vehicles summary(object, ...)

# S3 method for Vehicles plot(x, ..., message = TRUE)

Arguments

x

Object with class "Vehicles"

...

ignored

object

Object with class "Vehicles"

message

message with average age

Value

Objects of class "Vehicles" or "units"

Examples

Run this code
# NOT RUN {
{
lt <- rnorm(100, 300, 10)
class(lt)
vlt <- Vehicles(lt)
class(vlt)
plot(vlt)
LT_B5 <- age_hdv(x = lt,name = "LT_B5")
print(LT_B5)
summary(LT_B5)
plot(LT_B5)
}
# }

Run the code above in your browser using DataLab