Learn R Programming

move (version 4.2.5)

unUsedRecords<-: Extracts or creates the unUsedRecords

Description

This function returns the unUsedRecords part of the move object or assigns locations as unused, this could for example be used to remove test locations from a track. unUsedRecords can include events with no locations, locations flagged as outliers, non-location sensor data when includeExtraSensors is set to TRUE in the getMovebankData function.

Usage

# S4 method for .unUsedRecords
unUsedRecords(obj,...)
 # S4 method for .unUsedRecordsStack
unUsedRecords(obj,...)
  
 # S4 method for .MoveTrackSingle,logical
unUsedRecords(obj) <- value
 # S4 method for .MoveTrackStack,logical
unUsedRecords(obj) <- value

Value

an .unUsedRecords or .unUsedRecordsStack object

Arguments

obj

a move, moveStack or moveBurst object

value

A logical vector of the same length as the number of locations

...

Currently not implemented

Author

Marco Smolla & Anne Scharf

Examples

Run this code
data(leroy)
data(fishers)

## get unused records from a move or moveStack object
str(unUsedRecords(leroy)) # from a move object
str(unUsedRecords(fishers)) # from a moveStack object

## assign locations of a move object as unused record
par(mfrow=2:1)
plot(leroy, type='b')
# e.g. assign every second location as unused
unUsedRecords(leroy)<-as.logical((1:n.locs(leroy))%%2) 
plot(leroy, type='b')

# e.g. assign first 20 locations as unused
data(leroy)
unUsedRecords(leroy)<- as.logical(c(rep("TRUE",20), rep("FALSE",n.locs(leroy)-20)))

Run the code above in your browser using DataLab