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

> ### Name: train.spLearner,SpatialPointsDataFrame,ANY,SpatialPixelsDataFrame-method
> ### Title: Train a spatial prediction and/or interpolation model using
> ###   Ensemble Machine Learning
> ### Aliases:
> ###   train.spLearner,SpatialPointsDataFrame,ANY,SpatialPixelsDataFrame-method
> ###   train.spLearner
> ###   train.spLearner,data.frame,formula,SpatialPixelsDataFrame-method
> 
> ### ** Examples
> 
> library(mlr)
Loading required package: ParamHelpers
'mlr' is in maintenance mode since July 2019. Future development
efforts will go into its successor 'mlr3' (<https://mlr3.mlr-org.com>).
> library(rgdal)
Loading required package: sp
rgdal: version: 1.5-18, (SVN revision 1082)
Geospatial Data Abstraction Library extensions to R successfully loaded
Loaded GDAL runtime: GDAL 2.2.4, released 2018/03/19
Path to GDAL shared files: /usr/local/share/gdal
GDAL binary built with GEOS: TRUE 
Loaded PROJ runtime: Rel. 5.2.0, September 15th, 2018, [PJ_VERSION: 520]
Path to PROJ shared files: (autodetected)
Linking to sp version:1.4-4
> library(geoR)
--------------------------------------------------------------
 Analysis of Geostatistical Data
 For an Introduction to geoR go to http://www.leg.ufpr.br/geoR
 geoR version 1.8-1 (built on 2020-02-08) is now loaded
--------------------------------------------------------------

> library(plotKML)
plotKML version 0.6-1 (2020-03-08)
URL: http://plotkml.r-forge.r-project.org/
> library(xgboost)
> library(kernlab)
> library(ranger)
> library(glmnet)
Loading required package: Matrix
Loaded glmnet 4.0-2
> library(boot)
> library(raster)

Attaching package: ‘raster’

The following objects are masked from ‘package:kernlab’:

    buffer, rotated

The following object is masked from ‘package:mlr’:

    resample

The following object is masked from ‘package:ParamHelpers’:

    getValues

> demo(meuse, echo=FALSE)
> ## Regression:
> sl = c("regr.nnet", "regr.ksvm", "regr.cvglmnet")
> m <- train.spLearner(meuse["lead"], covariates=meuse.grid[,c("dist","ffreq")],
+       lambda = 0, parallel=FALSE, SL.library = sl)
Converting ffreq to indicators...
Converting covariates to principal components...
Deriving oblique coordinates...TRUE
Fitting a variogram using 'linkfit' and trend model...TRUE
Estimating block size ID for spatial Cross Validation...TRUE
Using learners: regr.nnet, regr.ksvm, regr.cvglmnet...TRUE
Fitting a spatial learner using 'mlr::makeRegrTask'...TRUE
# weights:  103
initial  value 4728222.582127 
final  value 1647446.870968 
converged
# weights:  103
initial  value 4217432.434934 
final  value 1299732.548387 
converged
# weights:  103
initial  value 4498986.920255 
final  value 1572688.024194 
converged
# weights:  103
initial  value 4474539.472945 
final  value 1578684.217742 
converged
# weights:  103
initial  value 4337296.422195 
final  value 1530187.677419 
converged
# weights:  103
initial  value 5561272.642331 
final  value 1908391.767742 
converged
Error in intI(j, n = x@Dim[2], dn[[2]], give.dn = FALSE) : 
  'NA' indices are not (yet?) supported for sparse Matrices
Calls: train.spLearner ... NextMethod -> predict.glmnet -> [ -> [ -> subCsp_cols -> intI
Execution halted