Learn R Programming

SDMtune (version 0.1.0)

modelReport: Model Report

Description

Make a report that shows the main results.

Usage

modelReport(model, type, folder, test = NULL, response_curves = FALSE,
  jk = FALSE, env = NULL, clamp = TRUE, permut = 10)

Arguments

model

'>SDMmodel object.

type

character. Output type, see predict,SDMmodel-method for more details.

folder

character. The name of the folder in which to save the output. The folder is created in the working directory.

test

'>SWD object with the test locations, default is NULL.

response_curves

logical, if TRUE it plots the response curves in the html output, default is FALSE.

jk

logical, if TRUE it runs the jackknife test, default FALSE.

env

stack. If provided it computes and adds a prediction map to the output, default is NULL.

clamp

logical for clumping during prediction, used for response curves and for the prediction map, default is TRUE.

permut

integer. Number of permutations, default is 10.

Details

The function produces a report similar to the one created by MaxEnt software.

Examples

Run this code
# NOT RUN {
# Acquire environmental variables
files <- list.files(path = file.path(system.file(package = "dismo"), "ex"),
                    pattern = "grd", full.names = TRUE)
predictors <- raster::stack(files)

# Prepare presence locations
p_coords <- condor[, 1:2]

# Prepare background locations
bg_coords <- dismo::randomPoints(predictors, 5000)

# Create SWD object
presence <- prepareSWD(species = "Vultur gryphus", coords = p_coords,
                       env = predictors, categorical = "biome")
bg <- prepareSWD(species = "Vultur gryphus", coords = bg_coords,
                 env = predictors, categorical = "biome")

# Split presence locations in training (80%) and testing (20%) datasets
datasets <- trainValTest(presence, test = 0.2)
train <- datasets[[1]]
test <- datasets[[2]]

# Train a model
model <- train(method = "Maxent", p = train, a = bg, fc = "l")

# Create the report
modelReport(model, type = "cloglog", folder = "my_folder", test = test,
            response_curves = TRUE, jk = TRUE, env = predictors)
# }

Run the code above in your browser using DataLab