## Not run: ------------------------------------
# modeloutput <- projectModel(newdat,
# transformation = "D:/path/to/modeling/directory/deriveVars/transformations.Rdata",
# model = "D:/path/to/modeling/directory/selectEV/round/model/1.lambdas")
## ---------------------------------------------
proj <- projectModel(toydata_sp1po, toydata_dvs$transformations,
system.file("extdata/sommerfeltia", "1.lambdas", package = "MIAmaxent"))
proj
## Not run: ------------------------------------
# # From vignette:
# grasslandPrediction <- projectModel(grasslandPO,
# transformation = grasslandDVs[[2]],
# model = system.file("extdata", "1.lambdas", package = "MIAmaxent"))
# head(grasslandPrediction$output)
# grasslandPrediction$ranges
#
# # From vignette:
# library(raster)
# contfiles <- list.files(system.file("extdata", "EV_continuous", package = "MIAmaxent"),
# full.names = TRUE)
# catfiles <- list.files(system.file("extdata", "EV_categorical", package = "MIAmaxent"),
# full.names = TRUE)
# stack <- raster::stack(c(contfiles, catfiles))
# stackpts <- rasterToPoints(stack)
# spatialPrediction <- projectModel(stackpts,
# transformation = grasslandDVs[[2]],
# model = system.file("extdata", "1.lambdas", package = "MIAmaxent"))
# Predictionraster <- raster(stack, layer=0)
# Predictionraster <- rasterize(spatialPrediction$output[, c("x", "y")], Predictionraster,
# field = spatialPrediction$output$PRO)
# plot(Predictionraster, colNA="black")
## ---------------------------------------------
Run the code above in your browser using DataLab