Running 'tracks.R' [3s]
Running the tests in 'tests/tracks.R' failed.
Complete output:
  > Sys.setenv(TZ = "Europe/Berlin")
  > # Load required libraries.
  > 
  > library(sp)
  > library(spacetime)
  > library(trajectories)
  > library(rgdal)
  rgdal: version: 1.5-10, (SVN revision 1006)
  Geospatial Data Abstraction Library extensions to R successfully loaded
  Loaded GDAL runtime: GDAL 3.0.4, released 2020/01/28
  Path to GDAL shared files: D:/temp/RtmpuIl0BX/RLIBS_28cac32514d9e/rgdal/gdal
  GDAL binary built with GEOS: TRUE 
  Loaded PROJ runtime: Rel. 6.3.1, February 10th, 2020, [PJ_VERSION: 631]
  Path to PROJ shared files: D:/temp/RtmpuIl0BX/RLIBS_28cac32514d9e/rgdal/proj
  Linking to sp version:1.4-2
  To mute warnings of possible GDAL/OSR exportToProj4() degradation,
  use options("rgdal_show_exportToProj4_warnings"="none") before loading rgdal.
  > 
  > # Create test objects. Do not change! Changes to the test objects are likely to
  > # have an impact on the test results. It is primarily validated against class
  > # and dimension. However, the test functions check for the first dimension only,
  > # since, in the majority of cases, a deviation of the second is not necessarily
  > # associated with a regression.
  > 
  > t0 = as.POSIXct(as.Date("2013-09-30", tz = "CET"))
  > set.seed(13531) # make sure rbind generates identical sequences on reproduction
  > 
  > # Person A, track 1.
  > 
  > x = c(7, 6, 5, 5, 4, 3, 3)
  > y = c(7, 7, 6, 5, 5, 6, 7)
  > n = length(x)
  > t = t0 + cumsum(runif(n) * 60)
  > crs = CRS("+proj=longlat +ellps=WGS84")
  Warning message:
  In showSRID(uprojargs, format = "PROJ", multiline = "NO") :
    Discarded datum Unknown based on WGS84 ellipsoid in CRS definition
  > stidf = STIDF(SpatialPoints(cbind(x, y), crs), t, data.frame(co2 = rnorm(n)))
  > A1 = Track(stidf)
  > 
  > # Person A, track 2.
  > 
  > x = c(7, 6, 6, 7, 7)
  > y = c(6, 5, 4, 4, 3)
  > n = length(x)
  > t = max(t) + cumsum(runif(n) * 60)
  > stidf = STIDF(SpatialPoints(cbind(x, y), crs), t, data.frame(co2 = rnorm(n)))
  > A2 = Track(stidf)
  > 
  > # Tracks for person A.
  > 
  > A = Tracks(list(A1 = A1, A2 = A2))
  > 
  > # Person B, track 1.
  > 
  > x = c(2, 2, 1, 1, 2, 3)
  > y = c(5, 4, 3, 2, 2, 3)
  > n = length(x)
  > t = max(t) + cumsum(runif(n) * 60)
  > stidf = STIDF(SpatialPoints(cbind(x, y), crs), t, data.frame(co2 = rnorm(n)))
  > B1 = Track(stidf)
  > 
  > # Person B, track 2.
  > 
  > x = c(3, 3, 4, 3, 3, 4)
  > y = c(5, 4, 3, 2, 1, 1)
  > n = length(x)
  > t = max(t) + cumsum(runif(n) * 60)
  > stidf = STIDF(SpatialPoints(cbind(x, y), crs), t, data.frame(co2 = rnorm(n)))
  > B2 = Track(stidf)
  > 
  > # Tracks for person B.
  > 
  > B = Tracks(list(B1 = B1, B2 = B2))
  > 
  > # Tracks collection.
  > 
  > Tr = TracksCollection(list(A = A, B = B))
  > 
  > all = list(A1, A2, B1, B2, A, B, Tr)
  > 
  > # Test methods.
  > 
  > checkClass = function(list, class) {
  + 	stopifnot(all(sapply(list, function(x) class(x)[1] == class)))
  + }
  > 
  > checkDim = function(list, dim) {
  + 	for(i in seq_along(list)) {
  + 		element = list[[i]]
  + 		if(class(element)[1] %in% c("data.frame", "xts", "STIDF", "SpatialPointsDataFrame"))
  + 			stopifnot(dim(element)[1] == dim[i])
  + 		else if(class(element)[1] == "Line")
  + 			stopifnot(dim(element@coords)[1] == dim[i])
  + 		else if(class(element)[1] == "Lines")
  + 			# For simplification purposes, the number of Line elements (= number
  + 			# of Tracks) is validated.
  + 			stopifnot(length(element@Lines) == dim[i])
  + 		else if(class(element)[1] %in% c("SpatialLines", "SpatialLinesDataFrame"))
  + 			# For simplification purposes, the sum of the number of Line
  + 			# elements (= total number of Tracks) is validated.
  + 			stopifnot(sum(sapply(element@lines, function(x) length(x@Lines))) == dim[i])
  + 		else
  + 			warning(paste("Validation against dimension of class '", class(element)[1], "' is not yet supported.", sep = ""))	
  + 	}
  + }
  > 
  > # Check coercion to segments.
  > 
  > res = lapply(all, function(x) as(x, "segments"))
  > checkClass(res, "data.frame")
  > dim = c(6, 4, 5, 5, 10, 10, 20)
  > checkDim(res, dim)
  > 
  > # Check coercion to data frame.
  > 
  > res = lapply(all, function(x) as(x, "data.frame"))
  > checkClass(res, "data.frame")
  > dim = c(7, 5, 6, 6, 14, 14, 28)
  > checkDim(res, dim)
  > 
  > # Check coercion to Line, Lines, SpatialLines and SpatialLinesDataFrame.
  > 
  > res = lapply(all[1:4], function(x) as(x, "Line"))
  > checkClass(res, "Line")
  > dim = c(7, 5, 6, 6)
  > checkDim(res, dim)
  > 
  > res = lapply(all[1:6], function(x) as(x, "Lines"))
  > checkClass(res, "Lines")
  > dim = c(1, 1, 1, 1, 2, 2)
  > checkDim(res, dim)
  > 
  > res = lapply(all, function(x) as(x, "SpatialLines"))
  There were 14 warnings (use warnings() to see them)
  > checkClass(res, "SpatialLines")
  > dim = c(1, 1, 1, 1, 2, 2, 4)
  > checkDim(res, dim)
  > 
  > res = lapply(all[5:length(all)], function(x) as(x, "SpatialLinesDataFrame"))
  Warning messages:
  1: In proj4string(obj@sp) :
    CRS object has comment, which is lost in output
  2: In showSRID(uprojargs, format = "PROJ", multiline = "NO") :
    Discarded datum Unknown based on WGS84 ellipsoid in CRS definition
  3: In proj4string(obj@sp) :
    CRS object has comment, which is lost in output
  4: In showSRID(uprojargs, format = "PROJ", multiline = "NO") :
    Discarded datum Unknown based on WGS84 ellipsoid in CRS definition
  5: In proj4string(obj@sp) :
    CRS object has comment, which is lost in output
  6: In showSRID(uprojargs, format = "PROJ", multiline = "NO") :
    Discarded datum Unknown based on WGS84 ellipsoid in CRS definition
  > checkClass(res, "SpatialLinesDataFrame")
  > dim = c(2, 2, 4)
  > checkDim(res, dim)
  > 
  > # Check coercion to xts.
  > 
  > res = lapply(all, function(x) as(x, "xts"))
  > checkClass(res, "xts")
  > dim = c(7, 5, 6, 6, 12, 12, 24)
  > checkDim(res, dim)
  > 
  > # Check coercion to STIDF.
  > 
  > res = lapply(all, function(x) as(x, "STIDF"))
  > checkClass(res, "STIDF")
  > dim = c(7, 5, 6, 6, 12, 12, 24)
  > checkDim(res, dim)
  > 
  > # Check coercion to SpatialPointsDataFrame.
  > 
  > res = lapply(all, function(x) as(x, "SpatialPointsDataFrame"))
  > checkClass(res, "SpatialPointsDataFrame")
  > dim = c(7, 5, 6, 6, 12, 12, 24)
  > checkDim(res, dim)
  > 
  > # Check proj4string methods.
  > 
  > stopifnot(all(sapply(all, function(x) proj4string(x) == "+proj=longlat +ellps=WGS84")))
  Error: all(sapply(all, function(x) proj4string(x) == "+proj=longlat +ellps=WGS84")) is not TRUE
  In addition: Warning messages:
  1: In proj4string(obj@sp) :
    CRS object has comment, which is lost in output
  2: In proj4string(obj@sp) :
    CRS object has comment, which is lost in output
  3: In proj4string(obj@sp) :
    CRS object has comment, which is lost in output
  4: In proj4string(obj@sp) :
    CRS object has comment, which is lost in output
  5: In proj4string(obj@sp) :
    CRS object has comment, which is lost in output
  6: In proj4string(obj@sp) :
    CRS object has comment, which is lost in output
  7: In proj4string(obj@sp) :
    CRS object has comment, which is lost in output
  Execution halted