Create a Move object

This function creates Move or MoveStack object from a .csv file with location data downloaded from a Movebank study, from a zip file downloaded from the EnvData (environmental annotation tool) of a Movebank study, from a ltraj object or from own data. If you use your own data you need to set the projection method with the 'proj' argument and specify which columns of your data contain the coordinates and timestamps.

# S4 method for connection,missing,missing,missing,missing
move(x, removeDuplicatedTimestamps=F, ...)

# S4 method for ltraj,missing,missing,missing,missing move(x, y, time, data, proj,...)

# S4 method for numeric,numeric,POSIXct,data.frame,CRS move(x, y, time, data, proj, sensor='unknown',animal='unnamed',...)


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. a ltraj object from adehabitatLT. numeric vector with x coordinates if non-Movebank data are provided (e.g. data$x).


numeric vector with y coordinates if non-Movebank data are provided (e.g. data$y).


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


extra data associated with the relocations, if empty it is filled with the coordinates and timestamps. Optional.


projection method for non-Movebank data; requires a valid CRS (see CRS-class) object, e.g. CRS("+proj=longlat +ellps=WGS84"); default is NA. Optional.


Sensor name(s), either single character or a vector with length of the number of coordinates. If multiple sensors are provided this has to be done as a vector with the same length as the number of coordinates. Optional.


animal ID(s) or name(s), either single character or a vector with length of the number of coordinates. If multiple individuals are provided this has to be done as a vector with the same length as the number of coordinates. Optional.


logical; if TRUE duplicated timestamps values will be removed. Only available when reading in data from movebank via path to a .csv file. It is strongly advised not to use this option because there is no control over which records are removed. We recommend to manually edit the duplicated timestamps with getDuplicatedTimestamps or edit the records in Movebank.


Additional arguments


The easiest way to import data is to download the study you are interested in from and set the file path as the x argument of the move function. The function detects whether there are single or multiple individuals in this file and automatically creates either a Move, MoveStack object. See the 'browseMovebank' vignette for more information on how to directly download data from Movebank from within R.

Another way is to read in your data using read.csv. Then specify the arguments "x" and "y" the columns of your data containing the x and y coordinates, in the argument "time" the column containing the timestamp, optionally the columns containing the information of the sensor(s) used, the animal name(s) and the projection, as well as the whole data.frame of the imported data. If the argument "animal" is left empty or contains only the name of one animal the function will return a Move object. If the data contains multiple animal names the function will return a MoveStack object.


returns an object of class 'move' or 'moveStack'.

If data of Movebank are used, the definitions of the content of the columns within the @idData, @sensor, @data slots of the move or moveStack object is detailed in the Attribute Dictionary on Movebank

When the move or moveStack is created providing a path to a .csv or .zip file downloaded from Movebank the coordinates in the @coords slot are named "location.long" and "". When the move or moveStack is created by providing a data.frame, the coordinates in the @coords slot are named "coords.x1" and "coords.x2".


It is checked whether the imported data set (via file path) is in a Movebank format. If your data isn't in a Movebank format, you have to use the alternative import for non-Movebank data reading in your data using read.csv and specifying which columns contain the needed information (see 'Details').

Locations with "NA": Because the SpatialPointsDataFrame function that creates the spatial data frame of the Move object can not process NA location values, all rows with NA locations are stored as unused records in the Move object.

Duplicated timestamps: If the data include double timestamps you can use the getDuplicatedTimestamps function to identify them and then decide which one to keep before creating the Move object. When you are importing data from movebank (via path to .csv or .zip file) you can also set the argument "removeDuplicatedTimestamps=TRUE", but this does no attempt to retain the most likely location.

Naming: Due to convention all names are turned into 'good names' which means, without spaces ('Ricky T' becomes 'Ricky.T'), if names are numbers a "X" will be prepended ('12345' becomes 'X12345') and most symbols will be replaced by "." ('Ricky-T' becomes 'Ricky.T').

Outliers: In Movebank outliers can be marked manually. When the move object is created by providing the path to the file downloaded from Movebank, these records are automatically placed in the UnusedRecords slots. If these marked outliers want to be included in the move object, read in the data from the downloaded csv file from movebank with read.csv, and create the move object providing the columns with the coordinates, timestamp, data.frame, projection, sensor and animal name. This way the marked outliers are ignored and all data are included in the move object.

Multiple sensors: If a move/moveStack object contains multiple sensors, this object can be separated into a move/moveStack object per sensor type: x[x@sensor=="z"] where "x" is a Move or a MoveStack object, and "z" is the name of the sensor e.g. "GPS", "Radio Transmitter", etc.

  • move
  • move,character,missing,missing,missing,missing-method
  • move,connection,missing,missing,missing,missing-method
  • move,ltraj,missing,missing,missing,missing-method
  • move,numeric,numeric,POSIXct,data.frame,character-method
  • move,numeric,numeric,POSIXct,data.frame,CRS-method
  • move,numeric,numeric,POSIXct,data.frame,missing-method
  • move,numeric,numeric,POSIXct,missing,ANY-method
## create a move object from a Movebank csv file
data <- move(filePath)

## create a move object from non-Movebank data
file <- read.table(filePath, header=TRUE, sep=",", dec=".")
data <- move(x=file$location.long, y=file$, 
	     time=as.POSIXct(file$timestamp, format="%Y-%m-%d %H:%M:%S", tz="UTC"), 
	     data=file, proj=CRS("+proj=longlat +ellps=WGS84"), 
	     animal="Leroy", sensor="GPS")
plot(data, type="b", pch=20)

## if the data contain multiple individuals a moveStack will be created
fishersSubset <- read.table(fishersPath, header=TRUE, sep=",", dec=".")
data2 <- move(x=fishersSubset$location.long, y=fishersSubset$, 
             time=as.POSIXct(fishersSubset$timestamp,format="%Y-%m-%d %H:%M:%S", tz="UTC"), 
             data=fishersSubset, proj=CRS("+proj=longlat +ellps=WGS84"),
plot(data2, type="b", pch=20, col=c("green","blue")[data2@idData$individual.local.identifier])
plot(data2[[2]], type="l")

# }
Documentation reproduced from package move, version 3.1.0, License: GPL (>= 3)

Community examples

Looks like there are no examples yet.