mark_time_gaps: Mark segments between data gaps

Description Usage Arguments Value Credit Author(s) See Also Examples

View source: R/mark_time_gaps.R

Description

Mark segments between data gaps

Usage

1
2
3
4
mark_time_gaps(
  tracks, interval = 0, factor = 3, ctime_difference = "time_difference",
  bind = TRUE, drop = TRUE, cname = "time_gap", t_id = "id"
)

Arguments

tracks

psyo. Data frame with tracks.

interval

numeric. Recording interval of the GPS tracker in seconds. Use 0 to automatically determine the interval. For this the most frequent interval is used.

factor

numeric. Multiplier to determine gaps. If a time difference between coordinates is bigger than tracker_interval * factor it is marked as gap.

ctime_difference

character. Column name of tracks that contains the time difference as numeric values.

bind

logical. Return the distance as list (FALSE) or add it to tracks (TRUE).

drop

logical. If TRUE and only one observation is returned drop the data frame and collapse the return value to a vector.

cname

character. Column name of tracks that marks gaps with TRUE. If the column does not exist it will be created.

t_id

character or numeric. Column name in tracks that identifies the separate tracks.

Value

psyo

Credit

If you use 'psyosphere' for commercial use or research, please support us by include one off the following references:

Author(s)

Benjamin Ziepert. Please send feedback to: feedback-psyosphere@analyse-gps.com.

See Also

mark_gap_segments, mark_speed_gaps, select_gaps

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
## Not run: 
# Get example data
data(psyo_rounds2)

# clean-up data
psyo_rounds2 <- average_duplicates(psyo_rounds2)

# Add gap segments
psyo_rounds2 <- t_time_difference(psyo_rounds2)
psyo_rounds2 <- mark_time_gaps(psyo_rounds2)

# Check result
psyo_rounds2 <- psyo_rounds2[ which(psyo_rounds2[,"time_gap"]) ,]

## End(Not run)

psyosphere documentation built on July 2, 2020, 12:08 a.m.