getDuplicatedTimestamps: Identifies duplicated timestamps

Description Usage Arguments Details Value Author(s) Examples

Description

Identifies all pairs of duplicated timestamps within an individual and sensor type from data downloaded from Movebank or own data.

Usage

1
2
3
4
5
  ## S4 method for signature 'character'
getDuplicatedTimestamps(x, ..., onlyVisible = TRUE)
 
  ## S4 method for signature 'factor'
getDuplicatedTimestamps(x, timestamps, sensorType, visible=NULL, ...)

Arguments

x

Full path to the csv (or compressed) file location downloaded from a Movebank study, or to the zip file location downloaded from the EnvData tool in Movebank.
data.frame read into R from a csv file downloaded from Movebank.
factor containing the name(s) of the individual(s) if non-Movebank data are provided.

timestamps

Vector containing timestamps with POSIXct conversion if non-Movebank data are provided,i.e. as.POSIXct(data$timestamp, format="%Y-%m-%d %H:%M:%S", tz="UTC")

sensorType

Vector containing sensor type if non-Movebank data are provided.

onlyVisible

An logical indicating if the visible column in the movebank data should be considered when the column visible is present, the default is to ignore all non-visible/outlier locations

visible

An logical vector indicating the locations that should be considered.

...

Currently not implemented

Details

If own data (non-Movebank) are used, the vectors specified in "x", "timestamps" and "sensorType" have to have the same length.

Value

This function returns a list. The name of the list elements contains the individual's name, the timestamp that is duplicated and the sensor type. Each list element contains a vector with the corresponding row numbers where the duplicated timestamps are located in the table. If no duplicated timestamps are found NULL is returned.

Author(s)

Anne Scharf

Examples

1
2
3
4
5
6
7
8
data(duplicatedDataExample)
getDuplicatedTimestamps(x=as.factor(duplicatedDataExample$individual.id), 
                        timestamps=as.POSIXct(duplicatedDataExample$timestamps, 
					      format="%Y-%m-%d %H:%M:%S", tz="UTC"),
                        sensorType=duplicatedDataExample$sensor.type)

filePath<-system.file("extdata","leroy.csv.gz",package="move")
getDuplicatedTimestamps(filePath)

move documentation built on Sept. 11, 2018, 5:06 p.m.