Speed: Construction function for class "Speed"

Description Usage Arguments Value See Also Examples

View source: R/Speed.R

Description

Speed returns a tranformed object with class "Speed" and units km/h. This functions includes two arguments, distance and time. Therefore, it is posibel to change the units of the speed to "m" to "s" for example. This function returns a dataframe with units for speed. When this function is applied to numeric vectors it add class "units".

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
Speed(x, ...)

## S3 method for class 'Speed'
print(x, ...)

## S3 method for class 'Speed'
summary(object, ...)

## S3 method for class 'Speed'
plot(x, ...)

Arguments

x

Object with class "data.frame", "matrix" or "numeric"

...

ignored

object

Object with class "Speed"

Value

Constructor for class "Speed" or "units"

See Also

units

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
{
data(net)
data(pc_profile)
speed <- Speed(net$ps)
class(speed)
plot(speed, type = "l")
pc_week <- temp_fact(net$ldv+net$hdv, pc_profile)
df <- netspeed(pc_week, net$ps, net$ffs, net$capacity, net$lkm)
summary(df)
}

ibarraespinosa/vein documentation built on Dec. 16, 2018, 10:06 a.m.