Running examples in ‘GET-Ex.R’ failed
The error most likely occurred in:

> ### Name: global_envelope_test
> ### Title: Global envelope test
> ### Aliases: global_envelope_test
> 
> ### ** Examples
> 
> # Goodness-of-fit testing for simple hypothesis
> if(require("spatstat", quietly=TRUE)) {
+   # Testing complete spatial randomness (CSR)
+   #==========================================
+   X <- unmark(spruces)
+ 
+   ## Don't show: 
+ nsim <- 19 # Number of simulations
+ ## End(Don't show)
+ 
+   # Illustration of general workflow for simple hypotheses
+   #=======================================================
+   # First illustrate the general workflow for the test by this example
+   # of CSR test for a point pattern X using the empirical L-function.
+   # Define the argument values at which the functions are evaluated
+   obs.L <- Lest(X, correction = "translate")
+   r <- obs.L[['r']]
+   # The test function for the data
+   obs <- obs.L[['trans']] - r
+   # Prepare simulations and calculate test functions for them at same r as 'obs'
+   sim <- matrix(nrow = length(r), ncol = nsim)
+   for(i in 1:nsim) {
+     sim.X <- runifpoint(ex = X) # simulation under CSR
+     sim[, i] <- Lest(sim.X, correction = "translate", r = r)[['trans']] - r
+   }
+   # Create a curve_set containing argument values, observed and simulated functions
+   cset <- create_curve_set(list(r = r, obs = obs, sim_m = sim))
+   # Perform the test
+   res <- global_envelope_test(cset, type="erl")
+   plot(res, ylab = expression(italic(hat(L)(r)-r)))
+ 
+   # Simple hypothesis for a point pattern utilizing the spatstat package
+   #=====================================================================
+   # Generate nsim simulations under CSR, calculate L-function for the data and simulations
+   env <- envelope(X, fun="Lest", nsim=nsim,
+                   savefuns=TRUE, # save the functions
+                   correction="translate", # edge correction for L
+                   transform = expression(.-r), # centering
+                   simulate=expression(runifpoint(ex=X))) # Simulate CSR
+   # The rank envelope test (ERL)
+   res <- global_envelope_test(env, type="erl")
+   # Plot the result
+   plot(res)
+ 
+   ## Advanced use:
+   # Choose the interval of distances [r_min, r_max] (at the same time create a curve_set from 'env')
+   cset <- crop_curves(env, r_min=1, r_max=7)
+   # Do the rank envelope test (erl)
+   res <- global_envelope_test(cset, type="erl")
+   plot(res, ylab=expression(italic(L(r)-r)))
+ 
+ ##D   ## Don't show: 
+ ##D nsim <- 19 # Number of simulations
+ ## End(Don't show)##D 
+ ##D   # Specify distances for different test functions
+ ##D   n <- 500 # the number of r-values
+ ##D   rmin <- 0; rmax <- 20; rstep <- (rmax-rmin)/n
+ ##D   rminJ <- 0; rmaxJ <- 8; rstepJ <- (rmaxJ-rminJ)/n
+ ##D   r <- seq(0, rmax, by=rstep)    # r-distances for Lest
+ ##D   rJ <- seq(0, rmaxJ, by=rstepJ) # r-distances for Fest, Gest, Jest
+ ##D 
+ ##D   # Perform simulations of CSR and calculate the L-functions
+ ##D   env_L <- envelope(X, nsim=nsim,
+ ##D    simulate=expression(runifpoint(ex=X)),
+ ##D    fun="Lest", correction="translate",
+ ##D    transform=expression(.-r), # Take the L(r)-r function instead of L(r)
+ ##D    r=r,                       # Specify the distance vector
+ ##D    savefuns=TRUE,             # Save the estimated functions
+ ##D    savepatterns=TRUE)         # Save the simulated patterns
+ ##D   # Take the simulations from the returned object
+ ##D   simulations <- attr(env_L, "simpatterns")
+ ##D   # Then calculate the other test functions F, G, J for each simulated pattern
+ ##D   env_F <- envelope(X, nsim=nsim,
+ ##D                     simulate=simulations,
+ ##D                     fun="Fest", correction="Kaplan", r=rJ,
+ ##D                     savefuns=TRUE)
+ ##D   env_G <- envelope(X, nsim=nsim,
+ ##D                     simulate=simulations,
+ ##D                     fun="Gest", correction="km", r=rJ,
+ ##D                     savefuns=TRUE)
+ ##D   env_J <- envelope(X, nsim=nsim,
+ ##D                     simulate=simulations,
+ ##D                     fun="Jest", correction="none", r=rJ,
+ ##D                     savefuns=TRUE)
+ ##D 
+ ##D   # Crop the curves to the desired r-interval I
+ ##D   curve_set_L <- crop_curves(env_L, r_min=rmin, r_max=rmax)
+ ##D   curve_set_F <- crop_curves(env_F, r_min=rminJ, r_max=rmaxJ)
+ ##D   curve_set_G <- crop_curves(env_G, r_min=rminJ, r_max=rmaxJ)
+ ##D   curve_set_J <- crop_curves(env_J, r_min=rminJ, r_max=rmaxJ)
+ ##D 
+ ##D   res <- global_envelope_test(curve_sets=list(L = curve_set_L, F = curve_set_F,
+ ##D                                               G = curve_set_G, J = curve_set_J))
+ ##D   plot(res)
+ ##D   plot(res, labels=c("L(r)-r", "F(r)", "G(r)", "J(r)"))
+ ##D   
+ ## End(No test)
+ }

spatstat 1.64-1       (nickname: ‘Help you I can, yes!’) 
For an introduction to spatstat, type ‘beginner’ 


Note: R version 3.6.2 (2019-12-12) is more than a year old; we strongly recommend upgrading to the latest version
Generating 19 simulations by evaluating expression  ...
1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18,  19.

Done.
Error in res[[names[i]]] <- attr(curve_set, names[i]) : 
  more elements supplied than there are to replace
Calls: global_envelope_test ... individual_global_envelope_test -> individual_central_region -> pick_attributes
Execution halted