gps <- data.frame(Latitude = c(32, 32.1, 32.2, 32.2, 32.2),
Longitude = c(-110, -110.1, -110.2, -110.3, -110.4),
UTC = as.POSIXct(c('2000-01-01 00:00:00', '2000-01-01 00:00:10',
'2000-01-01 00:00:20', '2000-01-01 00:00:30',
'2000-01-01 00:00:40')),
Heading = c(320, 320, 270, 270, 270),
Speed = c(.8, .8, .5, .5, .5))
straightPath(gps, nSmall=1, nLarge=2)
straightPath(gps, nSmall=1, nLarge=4)
Run the code above in your browser using DataLab