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

> ### Name: initiateAgents
> ### Title: 'SELES' - Initiate agents
> ### Aliases: initiateAgents
> ###   initiateAgents,Raster,missing,missing,ANY,missing-method
> ###   initiateAgents,Raster,missing,Raster,ANY,missing-method
> ###   initiateAgents,Raster,numeric,missing,ANY,missing-method
> ###   initiateAgents,Raster,numeric,Raster,ANY,missing-method
> ###   initiateAgents,Raster,missing,missing,ANY,numeric-method
> 
> ### ** Examples
> 
> library(magrittr)
> library(raster)
Loading required package: sp

Attaching package: 'raster'

The following object is masked from 'package:magrittr':

    extract

> library(quickPlot)
> 
> map <- raster(xmn = 0, xmx = 10, ymn = 0, ymx = 10, val = 0, res = 1)
> map <- gaussMap(map, scale = 1, var = 4, speedup = 1)
> pr <- probInit(map, p = (map/maxValue(map))^2)
> agents <- initiateAgents(map, 100, pr)
> if (interactive()) {
+   clearPlot()
+   Plot(map)
+   Plot(agents, addTo = "map")
+ }
> 
> # Note, can also produce a Raster representing agents,
> # then the number of points produced can't be more than
> # the number of pixels:
> agentsRas <- initiateAgents(map, 30, pr, asSpatialPoints = FALSE)
> if (interactive()) Plot(agentsRas)
> 
> if (require(dplyr)) {
+   # Check that the agents are more often at the higher probability areas based on pr
+   out <- data.frame(stats::na.omit(crosstab(agentsRas, map)), table(round(map[]))) %>%
+      dplyr::mutate(selectionRatio = Freq/Freq.1) %>%
+      dplyr::select(-Var1, -Var1.1) %>%
+      dplyr::rename(Present = Freq, Avail = Freq.1, Type = Var2)
+   out
+ }
Loading required package: dplyr

Attaching package: 'dplyr'

The following objects are masked from 'package:raster':

    intersect, select, union

The following objects are masked from 'package:stats':

    filter, lag

The following objects are masked from 'package:base':

    intersect, setdiff, setequal, union

Error in is_character(x) : object 'Var1.1' not found
Calls: %>% ... vars_select_eval -> map_if -> map -> .Call -> .f -> - -> is_character
Execution halted