Learn R Programming

⚠️There's a newer version (3.0.4) of this package.Take me there.

SpaDES.core

Core functionality for Spatial Discrete Event Simulation (SpaDES)

Website: https://SpaDES.PredictiveEcology.org

Wiki: https://github.com/PredictiveEcology/SpaDES/wiki

Installation

Current stable release

Install from CRAN:

install.packages("SpaDES.core")

Install from GitHub:

#install.packages("devtools")
library("devtools")
install_github("PredictiveEcology/SpaDES.core", dependencies = TRUE) # master

Development version (unstable)

Install from GitHub:

#install.packages("devtools")
library("devtools")
install_github("PredictiveEcology/SpaDES.core", ref = "development", dependencies = TRUE)

Contributions

Please see CONTRIBUTING.md for information on how to contribute to this project.

Copy Link

Version

Install

install.packages('SpaDES.core')

Monthly Downloads

869

Version

1.0.9

License

GPL-3

Issues

Pull Requests

Stars

Forks

Maintainer

Alex Chubaty

Last Published

September 30th, 2021

Functions in SpaDES.core (1.0.9)

.addChangedAttr,simList-method

.addChangedAttr for simList objects
anyPlotting

Test whether there should be any plotting from .plot parameter
append_attr

Add a module to a moduleList
Copy,simList-method

Copy for simList class objects
.addTagsToOutput,simList-method

.addTagsToOutput for simList objects
all.equal.simList

All equal method for simLists
.addDepends

Add simulation dependencies
clearCache,simList-method

clearCache for simList objects
Plot,simList-method

Plot method for simList objects
copyModule

Create a copy of an existing module
checkParams

Check use and existence of params passed to simulation.
doEvent.checkpoint

Simulation checkpoints.
Plots

Plot wrapper intended for use in a SpaDES module
checkModuleLocal

Check for the existence of a module locally
checkObject

Check for existence of object(s) referenced by a objects slot of a simList object
downloadData

Download module data
eventDiagram

Simulation event diagram
downloadModule

Download a module from a SpaDES module GitHub repository
createsOutput

Define an output object of a module
expectsInput

Define an input object that the module expects.
.checkCacheRepo,list-method

.checkCacheRepo for simList objects
.coreModules

Named list of core SpaDES modules
.depsPruneEdges

Prune edges to remove cycles in module dependencies
SpaDES.core-package

Categorized overview of the SpaDES.core package
doEvent

Process a simulation event
findObjects

Find objects if passed as character strings
checksums

Calculate checksum for a module's data files
classFilter

Filter objects by class
.findElementsInEnv

Find all references to sim$
bindrows

Simple wrapper around data.table::rbindlist
defineModule

Define a new module.
.cacheMessage,simList-method

.cacheMessage for simList objects
.findModuleName

Identify module names up to a given recursive level
checkModule

Check for the existence of a remote module
depsGraph

Build a module dependency graph
experiment

Deprecated functions
defineParameter

Define a parameter used in a module
ganttStatus

ganttStatus
globals

Get and set global simulation parameters
.depsLoadOrder

Determine module load order
extractURL

Extract a url from module metadata
.getModuleInputObjects

Extract the user-defined .inputObjects function from a module
.fillOutputRows

An internal function for coercing a data.frame to outputs()
.fileEdit

Open a file for editing
.fileExtensions

File extensions map
.isNamespaced

Check is module uses module namespacing
.identifyChildModules

Identify Child Modules from a recursive list
loadPackages

Load packages.
.findSimList

Find simList in a nested list
.fillInputRows

An internal function for coercing a data.frame to inputs()
depsEdgeList

Build edge list for module dependency graph
moduleDefaults

Defaults values used in defineModule
getModuleVersion

Find the latest module version from a SpaDES module repository
.getOption

A slightly modified version of getOption
.moduleDeps-class

The .moduleDeps class
moduleCodeFiles

Extract the full file paths for R source code
maxTimeunit

Determine the largest timestep unit in a simulation
memoryUseThisSession

Estimate memory used with system("ps")
moduleCoverage

Calculate module coverage of unit tests
moduleVersion

Parse and extract a module's version
newModuleDocumentation

Create new module documentation
emptyEventList

Blank (template) event list
newModule

Create new module from template
.keepAttrs

Attach missing attributes from x to y
fileName

Extract filename (without extension) of a file
initialize,simList-method

Generate a simList object
.fileTableIn

Create empty fileTable for inputs and outputs
moduleGraph

Build a module dependency graph
moduleDiagram

Simulation module dependency diagram
.emptyMetadata

Default (empty) metadata
newModuleCode

Create new module code file
packages

Get module or simulation package dependencies
openModules

Open all modules nested within a base directory
newModuleTests

Create template testing structures for new modules
.callingModuleName

Namespacing within SpaDES
objSize.simList

Object size for simList
.modifySearchPath

Modify package order in search path
minTimeunit

Determine the smallest timeunit in a simulation
objectDiagram

Simulation object dependency diagram
setPaths

Get and set default working directories
scheduleEvent

Schedule a simulation event
envir

Simulation environment
.tagsByClass,simList-method

.tagsByClass for simList objects
events

Simulation event lists
progressInterval

Get and set simulation progress bar details
objectSynonyms

Identify synonyms in a simList
inSeconds

Convert time units
objs

Extract or replace an object from the simulation environment
rasterCreate

Simple wrapper to load any Raster* object This wraps either raster::raster, raster::stack, or raster::brick, allowing a single function to be used to create a new object of the same class as a template.
.quickCheck

The SpaDES.core variable to switch between quick and robust checking
.preDigestByClass,simList-method

Pre-digesting method for simList
remoteFileSize

Determine the size of a remotely hosted file
.runModuleInputObjects

Run module's .inputObjects
.pkgEnv

The SpaDES.core package environment
saveFiles

Save objects using .saveObjects in params slot of simInit
._inputObjectsDF

Create an empty data.frame object for use with inputObjects or outputObjects
restartR

Restart R programmatically
simInit

Initialize a new simulation
simInitAndSpades

Call simInit and spades together
newProgressBar

Progress bar
.robustDigest,simList-method

.robustDigest for simList objects
.runCodeChecks

Runs a series of code checks during simInit
show,simList-method

Show an Object
newProjectCode

Create new module code file
newProject

Create new SpaDES project
.parseMessage

Prepend module name to a message
loadSimList

Load a saved simList and ancillary files
updateList

Update elements of a named list with elements of a second named list
restartSpades

Restart an interrupted simulation
rndstr

Generate random strings
.simDeps-class

The .simDeps class
simFile

Generate simulation file name
.parseModulePartial

Parse and initialize a module
makeMemoisable.simList

Make simList correctly work with memoise
modules

Simulation modules and dependencies
paths

Specify paths for modules, inputs, outputs, and temporary rasters
.sim2gantt

sim2gantt
moduleMetadata

Parse and extract module metadata
moduleParams

Extract a module's parameters, inputs, or outputs
params

Get and set simulation parameters
times

Time usage in SpaDES
use_gha

Use GitHub actions for automated module checking
spades

Run a spatial discrete event simulation
spadesClasses

Classes defined in SpaDES
.unparsed

Determine which modules in a list are unparsed
simList-class

The simList class
outputs

Simulation outputs
.tryCatch

tryCatch that keeps warnings, errors and value (result)
writeRNGInfo

Write RNG state info to file
zipModule

Create a zip archive of a module subdirectory
dhour

SpaDES time units
spadesOptions

SpaDES.core options
.prepareOutput,simList-method

.prepareOutput for simList objects
.parseElems,simList-method

.parseElems for simList class objects
priority

Event priority
.verb

Chose verb conjugation for "to be"
suppliedElsewhere

Assess whether an object has or will be supplied from elsewhere
writeEventInfo

Write simulation event info to file
inputObjects

Metadata accessors
reexports

Objects exported from other packages
scheduleConditionalEvent

Schedule a conditional simulation event
rasterToMemory

Read raster to memory
inputs

Simulation inputs
saveSimList

Save a whole simList object to disk