Running examples in 'spacetime-Ex.R' failed
The error most likely occurred in:

> ### Name: stConstruct
> ### Title: create ST* objects from long or wide tables
> ### Aliases: stConstruct
> ### Keywords: manip
> 
> ### ** Examples
> 
> # example 0: construction of STFDF from long table:
> library(maps)
> states.m = map('state', plot=FALSE, fill=TRUE)
> IDs <- sapply(strsplit(states.m$names, ":"), function(x) x[1])
>  
> library(maptools)
Loading required package: sp
Checking rgeos availability: TRUE
Please note that 'maptools' will be retired by the end of 2023,
plan transition at your earliest convenience;
some functionality will be moved to 'sp'.
> states = map2SpatialPolygons(states.m, IDs=IDs)
> 
> library(plm)
> data(Produc)
> 
> yrs = 1970:1986
> t = as.POSIXct(paste(yrs, "-01-01", sep=""), tz = "GMT")
> # deselect District of Columbia, polygon 8, which is not present in Produc:
> Produc.st = STFDF(states[-8], t, Produc[(order(Produc[,2], Produc[,1])),])
> 
> # example 1: st from long table, with states as Spatial object:
> # use Date format for time:
> Produc$time = as.Date(paste(yrs, "01", "01", sep = "-"))
> # take centroids of states:
> xy = coordinates(states[-8])
> Produc$x = xy[,1]
> Produc$y = xy[,2]
> #using stConstruct, use polygon centroids for location:
> x = stConstruct(Produc, c("x", "y"), "time", interval = TRUE)
> class(x)
[1] "STIDF"
attr(,"package")
[1] "spacetime"
> stplot(x[,,"unemp"])
> 
> # alternatively, pass states as SpatialObj:
> Produc$state = gsub("TENNESSE", "TENNESSEE", Produc$state)
> Produc$State = gsub("_", " ", tolower(Produc$state))
> x = stConstruct(Produc, "State", "time", states[-8])
> class(x)
[1] "STFDF"
attr(,"package")
[1] "spacetime"
> all.equal(x, Produc.st, check.attributes = FALSE)
[1] TRUE
> 
> # stConstruct multivariable, time-wide
> library(maptools)
> fname = system.file("shapes/sids.shp", package="maptools")[1]
> nc = rgdal::readOGR(fname) 
Error in loadNamespace(x) : there is no package called 'rgdal'
Calls: loadNamespace -> withRestarts -> withOneRestart -> doWithOneRestart
Execution halted