average_coordinates: Calculates the mean position of coordinates within a time...

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

View source: R/average_coordinates.R

Description

Calculates the mean position of coordinates within a time interval.

Usage

1
average_coordinates(tracks, num, units = "minutes", t_id = "id")

Arguments

tracks

psyo. Data frame with tracks.

num

num The amount of time.

units

char Unit for time measurement. For example: "seconds", "minutes" or "days". See duration for more details.

t_id

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

Details

This function can be used to compress huge amounts of data to speed up the calculations.

The average for the columns time, lon and lat is calculated. See geomean for details. Other columns will be preserved but only the first row of every interval is considered.

Value

data frame

lon

num averaged longitude

lat

num averaged latitude

time

POSIXct averaged time

other

Preserved columns from input

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

geomean, average_duplicates, select_test_sample

Examples

1
2
3
4
5
## Not run: 
data(psyo_geomean)
average_coordinates(psyo_geomean,30,"seconds")

## End(Not run)

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