tests/testthat/test_select_without_gaps.R

# Print title
cat("\nTesting select_without_gaps()\n")

# Get data
data(psyo_rounds2)
tracks_no_gaps <- psyo_rounds2

# Calculations
tracks_no_gaps <- psyosphere::average_duplicates(tracks_no_gaps)
tracks_no_gaps <- t_time_difference(tracks_no_gaps)

tracks_no_gaps <- mark_time_gaps(tracks_no_gaps)
tracks_no_gaps <- select_without_gaps(tracks_no_gaps,"time_gap")

# Check results
if (NROW(tracks_no_gaps) != 627) { stop("Wrong number of observations") }
if (NCOL(tracks_no_gaps) != 12) { stop("Wrong number of variables") }

Try the psyosphere package in your browser

Any scripts or data that you put into this service are public.

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