Learn R Programming

SDMtune (version 0.1.0)

swd2csv: SWD to csv

Description

Save a '>SWD object as csv file.

Usage

swd2csv(swd, file_name)

Arguments

swd

'>SWD object.

file_name

character. The name of the file where to save the object.

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]

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

# Save the SWD objct as csv file
swd2csv(train, "train_data.csv")
# }

Run the code above in your browser using DataLab