average_duplicates: Correct coordinates with the same time

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

View source: R/average_duplicates.R

Description

Correct coordinates with the same time by replacing with one coordinate with a geomean position.

Usage

1
average_duplicates(tracks, t_id = "id")

Arguments

tracks

psyo. Data frame with tracks.

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

geomean, average_coordinates

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
## Not run: \dontrun{
# Get data
data(psyo)
psyo <- psyo[c(1,15),]
psyo[2, c("time","id")] <- psyo[1, c("time","id")]

# Plot coordinates
map <- plot_map(psyo)
plot <- map + ggplot2::geom_point(data = psyo, size = 5)
plot <- plot_line(psyo[,c("lon", "lat")], plot = plot)
plot

# Calculate mean position
psyo <- average_duplicates(psyo)

# Plot mean position
plot + ggplot2::geom_point(data = psyo, size = 5)

}
## End(Not run)

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