Stacks a list of Move objects

# S4 method for list
moveStack(x, forceTz=NULL, ...)

  # S4 method for Move
moveStack(x, ..., forceTz=NULL)

  # S4 method for MoveStack
moveStack(x, ..., forceTz=NULL)

Arguments

x

a list of move or moveStack objects (or a combination of both). Timestamps of all objects have to be in the same time zone.

forceTz

The time zone, as a character, that the resulting moveStack object should have (see OlsonNames() for available time zones). If NULL the timestamps of the resulting moveStack will be in the time zone of the computer (see Sys.timezone())

...

Additional move or moveStack objects.

Details

This function stacks single Move or Movestacks objects to a MoveStack object.

Note

All animal names are converted into 'good names' which means, that spaces are replaced with points and duplicated names get an individual number added. For example:
'Leroy, Leroy' -> adding number to duplicated names ->'Leroy, Leroy.1'
'Ricky T' -> replacing spaces -> 'Ricky.T'

Value

a 'MoveStack' object

See also

Examples

data(leroy) ricky<-move(system.file("extdata","ricky.csv.gz", package="move")) leroy<-spTransform(leroy, crs(ricky))
#> Warning: CRS object has comment, which is lost in output
## creating a moveStack from a list of move objects l <- list(ricky[200:270,], leroy[200:270,]) moveStack(l)
#> Warning: CRS object has comment, which is lost in output
#> Warning: CRS object has comment, which is lost in output
#> class : MoveStack #> features : 142 #> extent : -73.91388, -73.87868, 42.74148, 42.83967 (xmin, xmax, ymin, ymax)
#> Warning: CRS object has comment, which is lost in output
#> crs : +proj=longlat +datum=WGS84 +no_defs #> variables : 20 #> names : X, event.id, timestamp, eobs.battery.voltage, eobs.fix.battery.voltage, eobs.horizontal.accuracy.estimate, eobs.key.bin.checksum, eobs.speed.accuracy.estimate, eobs.start.timestamp, eobs.status, eobs.temperature, eobs.type.of.fix, eobs.used.time.to.get.fix, ground.speed, heading, ... #> min values : 250, 44528270, 1234700191.998, 3486, 3336, 3.07, 6327401, 0.37, 2009-02-15 12:15:00.000, A, -12, 3, 4, 0.01, 0, ... #> max values : 382, 44528651, 1266022819, 3725, 3540, 77.57, 4291715164, 28.11, 2010-02-13 01:00:01.000, A, 27, 3, 117, 5.04, 359.79, ... #> timestamps : 2009-02-15 12:16:31 ... 2010-02-13 01:00:19 Time difference of 363 days (start ... end, duration) #> sensors : gps #> indiv. data : behavioural.classification, manually.marked.outlier, visible, sensor.type, individual.taxon.canonical.name, tag.local.identifier, individual.local.identifier, study.name, study.timezone, eobs.fix.battery.voltage #> min ID Data : NA, NA, true, gps, Martes pennanti, 74, Leroy, Urban fisher GPS tracking, Eastern Standard Time, NA #> max ID Data : NA, NA, true, gps, Martes pennanti, 1016, Ricky.T, Urban fisher GPS tracking, Eastern Standard Time, NA #> individuals : Ricky.T, Leroy #> unused rec. : 2959 #> date created: 2020-06-29 20:16:11
## creating a moveStack from several move objects moveStack(ricky[200:270,], leroy[200:270,], forceTz="UTC")
#> Warning: CRS object has comment, which is lost in output
#> Warning: CRS object has comment, which is lost in output
#> class : MoveStack #> features : 142 #> extent : -73.91388, -73.87868, 42.74148, 42.83967 (xmin, xmax, ymin, ymax)
#> Warning: CRS object has comment, which is lost in output
#> crs : +proj=longlat +datum=WGS84 +no_defs #> variables : 20 #> names : X, event.id, timestamp, eobs.battery.voltage, eobs.fix.battery.voltage, eobs.horizontal.accuracy.estimate, eobs.key.bin.checksum, eobs.speed.accuracy.estimate, eobs.start.timestamp, eobs.status, eobs.temperature, eobs.type.of.fix, eobs.used.time.to.get.fix, ground.speed, heading, ... #> min values : 250, 44528270, 1234700191.998, 3486, 3336, 3.07, 6327401, 0.37, 2009-02-15 12:15:00.000, A, -12, 3, 4, 0.01, 0, ... #> max values : 382, 44528651, 1266022819, 3725, 3540, 77.57, 4291715164, 28.11, 2010-02-13 01:00:01.000, A, 27, 3, 117, 5.04, 359.79, ... #> timestamps : 2009-02-15 12:16:31 ... 2010-02-13 01:00:19 Time difference of 363 days (start ... end, duration) #> sensors : gps #> indiv. data : behavioural.classification, manually.marked.outlier, visible, sensor.type, individual.taxon.canonical.name, tag.local.identifier, individual.local.identifier, study.name, study.timezone, eobs.fix.battery.voltage #> min ID Data : NA, NA, true, gps, Martes pennanti, 74, Leroy, Urban fisher GPS tracking, Eastern Standard Time, NA #> max ID Data : NA, NA, true, gps, Martes pennanti, 1016, Ricky.T, Urban fisher GPS tracking, Eastern Standard Time, NA #> individuals : Ricky.T, Leroy #> unused rec. : 2959 #> date created: 2020-06-29 20:16:11
## creating a moveStack with the same time zone as input move objects moveStack(ricky[200:270,], leroy[200:270,], forceTz=attr(timestamps(ricky),"tzone"))
#> Warning: CRS object has comment, which is lost in output
#> Warning: CRS object has comment, which is lost in output
#> class : MoveStack #> features : 142 #> extent : -73.91388, -73.87868, 42.74148, 42.83967 (xmin, xmax, ymin, ymax)
#> Warning: CRS object has comment, which is lost in output
#> crs : +proj=longlat +datum=WGS84 +no_defs #> variables : 20 #> names : X, event.id, timestamp, eobs.battery.voltage, eobs.fix.battery.voltage, eobs.horizontal.accuracy.estimate, eobs.key.bin.checksum, eobs.speed.accuracy.estimate, eobs.start.timestamp, eobs.status, eobs.temperature, eobs.type.of.fix, eobs.used.time.to.get.fix, ground.speed, heading, ... #> min values : 250, 44528270, 1234700191.998, 3486, 3336, 3.07, 6327401, 0.37, 2009-02-15 12:15:00.000, A, -12, 3, 4, 0.01, 0, ... #> max values : 382, 44528651, 1266022819, 3725, 3540, 77.57, 4291715164, 28.11, 2010-02-13 01:00:01.000, A, 27, 3, 117, 5.04, 359.79, ... #> timestamps : 2009-02-15 12:16:31 ... 2010-02-13 01:00:19 Time difference of 363 days (start ... end, duration) #> sensors : gps #> indiv. data : behavioural.classification, manually.marked.outlier, visible, sensor.type, individual.taxon.canonical.name, tag.local.identifier, individual.local.identifier, study.name, study.timezone, eobs.fix.battery.voltage #> min ID Data : NA, NA, true, gps, Martes pennanti, 74, Leroy, Urban fisher GPS tracking, Eastern Standard Time, NA #> max ID Data : NA, NA, true, gps, Martes pennanti, 1016, Ricky.T, Urban fisher GPS tracking, Eastern Standard Time, NA #> individuals : Ricky.T, Leroy #> unused rec. : 2959 #> date created: 2020-06-29 20:16:11
# \dontshow{ data <- read.csv(system.file("extdata","leroy.csv.gz",package="move"))[100:199,] ricky2 <- move(x=data$location.long, y=data$location.lat, time=as.POSIXct(data$timestamp,format="%Y-%m-%d %H:%M:%OS", tz="UTC"), proj=CRS("+proj=longlat +ellps=WGS84 +datum=WGS84"), data=data, animal=paste0(data$individual.local.identifier,"a"), sensor=data$sensor)
#> Warning: There were NA locations detected and omitted. Currently they are not stored in unusedrecords
leroy<-spTransform(leroy, crs(ricky2))
#> Warning: CRS object has comment, which is lost in output
list <- list(leroy, ricky2) stack <- moveStack(list)
#> Warning: CRS object has comment, which is lost in output
#> Warning: CRS object has comment, which is lost in output
# }