duplicated_data: Find Duplicated Data in a Track Table

View source: R/errors.R

duplicated_dataR Documentation

Find Duplicated Data in a Track Table

Description

This function attempts to automatically detect duplicated data in track tables.

Usage

duplicated_data(x, type = "txy")

Arguments

x

track table as produced by the track function.

type

A character string or a vector of character strings indicating the type of duplications to look for. The strings can be any combination of "t" (for time duplications) and "x", "y", "z" (for coordinate duplications). For instance, the string "txy" will return data with duplicated time stamps and duplicated x and y coordinates.

Value

A track table of all observations that are duplicated, as per the duplication rule defined by type.

Note

Incomplete data (that is, data containing "NAs") are ignored.

Author(s)

Simon Garnier, garnier@njit.edu

See Also

track

Examples

# Create data set with duplicated data
data(short_tracks)
t_df <- track(x = short_tracks$x, y = short_tracks$y, t = short_tracks$t,
              id = short_tracks$id, proj = "+proj=longlat",
              tz = "Africa/Windhoek", table = "df")
t_df <- bind_tracks(t_df, t_df[1:10, ], t_df[100:110, ])

# Find duplicated timestamps
duplicated <- duplicated_data(t_df)


swarm-lab/trackdf documentation built on March 27, 2023, 2:13 a.m.