move (version 3.1.0)

getDuplicatedTimestamps: Identifies duplicated timestamps

Description

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

Usage

# S4 method for character
getDuplicatedTimestamps(x, ..., onlyVisible = TRUE)
 
  # S4 method for 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

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.

Details

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

Examples

Run this code
# NOT RUN {
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)


# }

Run the code above in your browser using DataLab