segment_0: segment_0

Description Usage Arguments Value

View source: R/segment_0.R

Description

Define a funtion "segment0" that separate different shifts

Usage

1
segment_0(speed, threshold, time_diff)

Arguments

speed

the speed is a vector of speeds to be segmented.

threshold

the threshold that is needed to segment the speeds. (the unit of threshold is an hour)

time_diff

the difference of time for each data point.

Value

shift number, which is a vector which indicates the separated shift numbers, with 0 indicated time of taking a rest.


caimiao0714/MiaoTruck documentation built on May 28, 2019, 7:14 p.m.