Skip to content

Commit

Permalink
Merge branch 'multipleModule3' into development
Browse files Browse the repository at this point in the history
  • Loading branch information
eliotmcintire committed Nov 17, 2018
2 parents 4c16374 + b89c19a commit 2ee5f26
Show file tree
Hide file tree
Showing 14 changed files with 206 additions and 109 deletions.
4 changes: 2 additions & 2 deletions DESCRIPTION
Expand Up @@ -8,8 +8,8 @@ Description: Provide the core discrete event simulation (DES) framework for
URL:
http://spades-core.predictiveecology.org/,
https://github.com/PredictiveEcology/SpaDES.core
Date: 2018-11-13
Version: 0.2.3
Date: 2018-11-16
Version: 0.2.3.9000
Authors@R: c(
person("Alex M", "Chubaty", email = "alex.chubaty@gmail.com",
role = c("aut", "cre"), comment = c(ORCID = "0000-0001-7146-8135")),
Expand Down
8 changes: 7 additions & 1 deletion NEWS.md
@@ -1,13 +1,19 @@
Known issues: https://github.com/PredictiveEcology/SpaDES.core/issues

version 0.2.4
=============

## new features
* An experimental new function and feature, `objectSynonyms`, which will create active bindings of two names to a single object
* User can now specify `modulePath` as a character vector, e.g., `simInit(..., paths = list(modulePath = c(".", "test")))`. This means that a user can organize the modules in different locations.

version 0.2.3
=============

## package dependencies
* add `RandomFields` to Suggests, as it is in the Suggests of `SpaDES.tools` and used in examples/tests.

## new features
* An experimental new function and feature, `objectSynonyms`, which will create active bindings of two names to a single object
* `simList` internals changed. It now inherits from `environment`. Amongst other things, this means that tab autocomplete in RStudio now works for objects in the `simList`. Also, we removed several associated methods, `$`, `[[`, `ls`, `ls.str`, `objects`, as the defaults for environments work correctly with the `simList` now
* `debug` arg in `spades` call can now take numeric, currently 1 or 2, giving a few pre-packaged informative messaging each event
* new function `elapsedTime` which gives a summary of the clock time used by each module or event
Expand Down
26 changes: 12 additions & 14 deletions R/check.R
Expand Up @@ -123,12 +123,8 @@ setMethod(
#'
#' @param sim A simList simulation object.
#'
#' @param coreModules List of core modules.
#'
#' @param coreParams List of default core parameters.
#'
#' @param path The location of the modules' source files.
#'
#' @param ... Additional arguments. Not implemented.
#'
#' @return Invisibly return \code{TRUE} indicating object exists; \code{FALSE} if not.
Expand All @@ -141,28 +137,31 @@ setMethod(
#' @author Alex Chubaty
#'
# igraph exports %>% from magrittr
setGeneric("checkParams", function(sim, coreModules, coreParams, path, ...) {
setGeneric("checkParams", function(sim, coreParams, ...) {
standardGeneric("checkParams")
})

#' @rdname checkParams
setMethod(
"checkParams",
signature(sim = "simList", coreModules = "list", coreParams = "list",
path = "character"),
definition = function(sim, coreModules, coreParams, path, ...) {
signature(sim = "simList", coreParams = "list"),
definition = function(sim, coreParams, ...) {
params <- sim@params
modules <- sim@modules
userModules <- modules[-which(coreModules %in% modules)]
userModules <- modules(sim) # already removes core modules
# modules <- sim@modules
# userModules <- modules[-which(coreModules %in% modules)]
globalParams <- sim@params$.globals
allFound <- TRUE

if (length(userModules)) {
### check whether each param in simInit occurs in a module's .R file
globalsFound <- list()
readFile <- list()
for (uM in userModules) {
filename <- paste(path, "/", uM, "/", uM, ".R", sep = "")
userModulePaths <- names(userModules)

for (uMP in userModulePaths) {
uM <- basename(uMP)
filename <- paste(uMP, "/", uM, ".R", sep = "")
readFile[[uM]] <- if (!is.null(sim@.xData[[".parsedFiles"]][[filename]])) {
# a little faster to use already parsed objects --
# might have happened earlier during simInit,
Expand All @@ -171,8 +170,7 @@ setMethod(
filename = filename)
deparse(tmp$parsedFile)
} else {
readLines(paste(path, "/", uM, "/", uM, ".R",
sep = ""))
readLines(filename)
}


Expand Down
12 changes: 11 additions & 1 deletion R/misc-methods.R
Expand Up @@ -135,7 +135,8 @@ setMethod("append_attr",
attributes(out[i]) <- attrs[[i]]
}
}
return(unique(out))
dups <- duplicated(out) # unique strips names ... out[!dups] does not
return(out[!dups])
})

################################################################################
Expand Down Expand Up @@ -646,3 +647,12 @@ setPaths <- function(cachePath, inputPath, modulePath, outputPath) {

lapply(.paths(), checkPath, create = TRUE)
}

.basename <- function (x) {
if (is.null(x)) {
NULL
}
else {
basename(x)
}
}
5 changes: 2 additions & 3 deletions R/module-dependencies-methods.R
Expand Up @@ -116,9 +116,8 @@ setMethod("depsGraph",
} else {
el <- depsEdgeList(sim, plot) %>% .depsPruneEdges()
}
core <- .pkgEnv$.coreModules %>% unlist()
m <- sim@modules %>% unlist()
v <- unique(c(el$to, el$from, m[-which(m %in% core)]))
m <- modules(sim) %>% unlist() # modules(sim) doesn't return hidden modules
v <- unique(c(el$to, el$from, m)) # so no need to remove them
return(graph_from_data_frame(el, vertices = v, directed = TRUE))
})

Expand Down
22 changes: 14 additions & 8 deletions R/simList-accessors.R
Expand Up @@ -37,7 +37,7 @@ setMethod(
out[[8]] <- capture.output(cat(">> Modules:\n"))
ord <- match(unlist(modules(object)), names(timeunits(object))) %>% na.omit
out[[9]] <- capture.output(print(
cbind(Name = modules(object),
cbind(Name = unname(modules(object)),
#Timeunit = c(rep(NA_character_, 4), unname(timeunits(object))[ord])),
Timeunit = unname(timeunits(object))[ord]),
quote = FALSE, row.names = FALSE))
Expand Down Expand Up @@ -251,7 +251,6 @@ setReplaceMethod(
#' @param value The object to be stored at the slot.
#'
#' @param hidden Logical. If TRUE, show the default core modules.
#'
#' @return Returns or sets the value of the slot from the \code{simList} object.
#'
#' @family functions to access elements of a \code{simList} object
Expand Down Expand Up @@ -2562,16 +2561,23 @@ setMethod(
} else {
if (!missing(filenames)) {
paths <- filenames
modules <- sub(basename(paths), replacement = "", pattern = ".R")
if (missing(modules)) {
modules <- sub(basename(paths), replacement = "", pattern = ".R")
}
} else if (!missing("modules")) {
prefix <- if (!missing("paths")) {
paths
prefix <- if (!file.exists(modules)) {
if (!missing("paths")) {
pre <- paths
} else {
getOption("spades.modulePath")
pre <- getOption("spades.modulePath")
}
paths <- file.path(prefix, modules, paste0(modules, ".R"))
file.path(pre, modules)
} else {
modules
}
paths <- file.path(prefix, paste0(modules, ".R"))
} else {
stop("one of sim, module, modules, or filename must be supplied.")
stop("one of sim, modules, or filename must be supplied.")
}

if (missing(envir)) {
Expand Down

1 comment on commit 2ee5f26

@lintr-bot
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

inst/examples/example_experiment.R:91:5: style: Commented code should be removed.

# library(raster)
    ^~~~~~~~~~~~~~~

inst/examples/example_experiment.R:92:5: style: Commented code should be removed.

# beginCluster(20) # if you have multiple clusters available, use them here to save time
    ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

inst/examples/example_experiment.R:96:5: style: Commented code should be removed.

# endCluster() # end the clusters
    ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

inst/examples/example_experiment.R:152:5: style: Commented code should be removed.

# fires <- lapply(sims, function(x) x$landscape$fires) %>% stack
    ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

inst/examples/example_POM.R:48:5: style: Commented code should be removed.

# cl <- makeCluster(detectCores() - 1) # not implemented yet in DEoptim
    ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

inst/examples/example_POM.R:83:4: style: Commented code should be removed.

#stopCluster(cl) # not yet implemented, waiting for DEoptim
   ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

inst/examples/example_POM.R:106:34: style: Variable or function name should be lowerCamelCase.

​    params(sim1)$caribouMovement$N <- pars[2]
                                 ^

inst/examples/example_POM.R:113:5: style: Variable or function name should be lowerCamelCase.

nPattern_Out <- caribouFn(out$caribou)
    ^~~~~~~~~~~~

inst/examples/example_POM.R:119:7: style: Commented code should be removed.

# cat(minimizeFn)
      ^~~~~~~~~~~~~~~

inst/examples/example_POM.R:120:7: style: Commented code should be removed.

# cat(" ")
      ^~~~~~~~

inst/examples/example_POM.R:121:7: style: Commented code should be removed.

# cat(pars)
      ^~~~~~~~~

inst/examples/example_POM.R:122:7: style: Commented code should be removed.

# cat("\n")
      ^~~~~~~~~

inst/sampleModules/caribouMovement/caribouMovement.R:1:1: style: Variable or function name should be lowerCamelCase.

SpaDES.core.version <- "0.1.0"
^~~~~~~~~~~~~~~~~~~

inst/sampleModules/caribouMovement/caribouMovement.R:54:1: style: Variable or function name should be lowerCamelCase.

doEvent.caribouMovement <- function(sim, eventTime, eventType, debug = FALSE) {
^~~~~~~~~~~~~~~~~~~~~~~

inst/sampleModules/caribouMovement/caribouMovement.R:78:1: style: Lines should not be more than 100 characters.

sim <- scheduleEvent(sim, time(sim) + SpaDES.core::P(sim)$moveInterval, "caribouMovement", "move")
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

inst/sampleModules/caribouMovement/caribouMovement.R:82:1: style: Lines should not be more than 100 characters.

​      Plot(sim$caribou, addTo = paste("sim", SpaDES.core::P(sim)$stackName, "habitatQuality", sep = "$"),
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

inst/sampleModules/caribouMovement/caribouMovement.R:86:1: style: Lines should not be more than 100 characters.

sim <- scheduleEvent(sim, time(sim) + SpaDES.core::P(sim)$.plotInterval, "caribouMovement", "plot", .last())
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

inst/sampleModules/caribouMovement/caribouMovement.R:90:1: style: Lines should not be more than 100 characters.

​      Plot(sim$caribou, addTo = paste("sim", SpaDES.core::P(sim)$stackName, "habitatQuality", sep = "$"),
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

inst/sampleModules/caribouMovement/caribouMovement.R:95:1: style: Lines should not be more than 100 characters.

sim <- scheduleEvent(sim, time(sim) + SpaDES.core::P(sim)$.plotInterval, "caribouMovement", "plot", .last())
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

inst/sampleModules/caribouMovement/caribouMovement.R:102:1: style: Lines should not be more than 100 characters.

sim <- scheduleEvent(sim, time(sim) + SpaDES.core::P(sim)$.saveInterval, "caribouMovement", "save", .last() + 1)
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

inst/sampleModules/caribouMovement/caribouMovement.R:114:1: style: Variable or function name should be lowerCamelCase.

Init <- function(sim) {
^~~~

inst/sampleModules/caribouMovement/caribouMovement.R:121:3: style: Variable or function name should be lowerCamelCase.

N <- SpaDES.core::P(sim)$N
  ^

inst/sampleModules/caribouMovement/caribouMovement.R:122:3: style: Variable or function name should be lowerCamelCase.

IDs <- as.character(1:N)
  ^~~

inst/sampleModules/caribouMovement/caribouMovement.R:138:1: style: Variable or function name should be lowerCamelCase.

Move <- function(sim) {
^~~~

inst/sampleModules/fireSpread/fireSpread.R:1:1: style: Variable or function name should be lowerCamelCase.

SpaDES.core.version <- "0.1.0"
^~~~~~~~~~~~~~~~~~~

inst/sampleModules/fireSpread/fireSpread.R:20:1: style: Lines should not be more than 100 characters.

​    person(c("Alex", "M"), "Chubaty", email = "alexander.chubaty@canada.ca", role = c("aut", "cre")),
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

inst/sampleModules/fireSpread/fireSpread.R:21:1: style: Lines should not be more than 100 characters.

​    person(c("Eliot", "J", "B"), "McIntire", email = "eliot.mcintire@canada.ca", role = c("aut", "cre")),
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

inst/sampleModules/fireSpread/fireSpread.R:35:1: style: Lines should not be more than 100 characters.

​    defineParameter("persistprob", "numeric", 0.00, 0, 1, "probability of fire persisting in a pixel"),
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

inst/sampleModules/fireSpread/fireSpread.R:37:1: style: Lines should not be more than 100 characters.

​    defineParameter("spreadprob", "numeric", 0.225, 0.05, 0.5, "probability of fire spreading into a pixel"),
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

inst/sampleModules/fireSpread/fireSpread.R:38:1: style: Lines should not be more than 100 characters.

​    defineParameter("startTime", "numeric", start(sim) + 1, 0, end(sim), "time of initial fire ignition"),
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

inst/sampleModules/fireSpread/fireSpread.R:39:1: style: Lines should not be more than 100 characters.

​    defineParameter(".plotInitialTime", "numeric", start(sim), start(sim), end(sim) + 1, "time to schedule first plot event"),
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

inst/sampleModules/fireSpread/fireSpread.R:41:1: style: Lines should not be more than 100 characters.

​    defineParameter(".saveInitialTime", "numeric", NA_real_, NA, NA, "time to schedule first save event"),
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

inst/sampleModules/fireSpread/fireSpread.R:42:1: style: Lines should not be more than 100 characters.

​    defineParameter(".saveInterval", "numeric", NA_real_, NA, NA, "time interval between save events")
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

inst/sampleModules/fireSpread/fireSpread.R:45:1: style: Lines should not be more than 100 characters.

​    expectsInput(objectName = SpaDES.core::P(sim, "fireSpread")$stackName, objectClass = "RasterStack",
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

inst/sampleModules/fireSpread/fireSpread.R:51:1: style: Lines should not be more than 100 characters.

​    createsOutput(objectName = SpaDES.core::P(sim, "fireSpread")$stackName, objectClass = "RasterStack",
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

inst/sampleModules/fireSpread/fireSpread.R:59:1: style: Variable or function name should be lowerCamelCase.

doEvent.fireSpread <- function(sim, eventTime, eventType, debug = FALSE) {
^~~~~~~~~~~~~~~~~~

inst/sampleModules/fireSpread/fireSpread.R:80:1: style: Lines should not be more than 100 characters.

sim <- scheduleEvent(sim, SpaDES.core::P(sim)$.plotInitialTime, "fireSpread", "plot.init", .last())
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

inst/sampleModules/fireSpread/fireSpread.R:87:1: style: Lines should not be more than 100 characters.

sim <- scheduleEvent(sim, time(sim), "fireSpread", "stats") # do stats immediately following burn
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

inst/sampleModules/fireSpread/fireSpread.R:88:1: style: Lines should not be more than 100 characters.

sim <- scheduleEvent(sim, time(sim) + SpaDES.core::P(sim)$returnInterval, "fireSpread", "burn")
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

inst/sampleModules/fireSpread/fireSpread.R:108:1: style: Lines should not be more than 100 characters.

stackName <- SpaDES.core::P(sim)$stackName # Plot doesn't like long names -- create local variable
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

inst/sampleModules/fireSpread/fireSpread.R:143:1: style: Variable or function name should be lowerCamelCase.

Init <- function(sim) {
^~~~

inst/sampleModules/fireSpread/fireSpread.R:147:3: style: Variable or function name should be lowerCamelCase.

Fires <- raster(extent(landscapes), ncol = ncol(landscapes),
  ^~~~~

inst/sampleModules/fireSpread/fireSpread.R:151:3: style: Variable or function name should be lowerCamelCase.

Fires <- setValues(Fires, 0)
  ^~~~~

inst/sampleModules/fireSpread/fireSpread.R:154:14: style: Variable or function name should be lowerCamelCase.

landscapes$Fires <- Fires
             ^~~~~

inst/sampleModules/fireSpread/fireSpread.R:160:1: style: Variable or function name should be lowerCamelCase.

Burn <- function(sim) {
^~~~

inst/sampleModules/fireSpread/fireSpread.R:163:3: style: Variable or function name should be lowerCamelCase.

Fires <- spread(landscapes[[1]],
  ^~~~~

inst/sampleModules/fireSpread/fireSpread.R:175:14: style: Variable or function name should be lowerCamelCase.

landscapes$Fires <- Fires
             ^~~~~

inst/sampleModules/fireSpread/fireSpread.R:182:1: style: Variable or function name should be lowerCamelCase.

Stats <- function(sim) {
^~~~~

inst/sampleModules/randomLandscapes/randomLandscapes.R:1:1: style: Variable or function name should be lowerCamelCase.

SpaDES.core.version <- "0.1.0"
^~~~~~~~~~~~~~~~~~~

inst/sampleModules/randomLandscapes/randomLandscapes.R:33:1: style: Lines should not be more than 100 characters.

​    defineParameter("inRAM", "logical", FALSE, TRUE, FALSE, "should the raster be stored in memory?"),
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

inst/sampleModules/randomLandscapes/randomLandscapes.R:34:1: style: Lines should not be more than 100 characters.

​    defineParameter("nx", "numeric", 100L, 10L, 500L, "size of map (number of pixels) in the x dimension"),
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

inst/sampleModules/randomLandscapes/randomLandscapes.R:35:1: style: Lines should not be more than 100 characters.

​    defineParameter("ny", "numeric", 100L, 10L, 500L, "size of map (number of pixels) in the y dimension"),
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

inst/sampleModules/randomLandscapes/randomLandscapes.R:37:1: style: Lines should not be more than 100 characters.

​    defineParameter(".plotInitialTime", "numeric", start(sim), start(sim), NA, "time to schedule first plot event"),
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

inst/sampleModules/randomLandscapes/randomLandscapes.R:38:1: style: Lines should not be more than 100 characters.

​    defineParameter(".plotInterval", "numeric", NA_real_, NA, NA, "time interval between plot events"),
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

inst/sampleModules/randomLandscapes/randomLandscapes.R:39:1: style: Lines should not be more than 100 characters.

​    defineParameter(".saveInitialTime", "numeric", NA_real_, NA, NA, "time to schedule first save event"),
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

inst/sampleModules/randomLandscapes/randomLandscapes.R:40:1: style: Lines should not be more than 100 characters.

​    defineParameter(".saveInterval", "numeric", NA_real_, NA, NA, "time interval between save events"),
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

inst/sampleModules/randomLandscapes/randomLandscapes.R:41:1: style: Lines should not be more than 100 characters.

​    defineParameter(".useCache", "logical", FALSE, c("init", "plot"), NA, "should the module result be cached for future use")
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

inst/sampleModules/randomLandscapes/randomLandscapes.R:49:1: style: Lines should not be more than 100 characters.

​    createsOutput(objectName = SpaDES.core::P(sim, "randomLandscapes")$stackName, objectClass = "RasterStack",
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

inst/sampleModules/randomLandscapes/randomLandscapes.R:55:1: style: Variable or function name should be lowerCamelCase.

doEvent.randomLandscapes <- function(sim, eventTime, eventType, debug = FALSE) {
^~~~~~~~~~~~~~~~~~~~~~~~

inst/sampleModules/randomLandscapes/randomLandscapes.R:63:1: style: Lines should not be more than 100 characters.

sim <- scheduleEvent(sim, SpaDES.core::P(sim)$.plotInitialTime, "randomLandscapes", "plot", .last())
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

inst/sampleModules/randomLandscapes/randomLandscapes.R:64:1: style: Lines should not be more than 100 characters.

sim <- scheduleEvent(sim, SpaDES.core::P(sim)$.saveInitialTime, "randomLandscapes", "save", .last() + 1)
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

inst/sampleModules/randomLandscapes/randomLandscapes.R:76:1: style: Lines should not be more than 100 characters.

sim <- scheduleEvent(sim, time(sim) + SpaDES.core::P(sim)$.saveInterval, "randomLandscapes", "save", .last() + 1)
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

inst/sampleModules/randomLandscapes/randomLandscapes.R:87:1: style: Variable or function name should be lowerCamelCase.

Init <- function(sim) {
^~~~

inst/sampleModules/randomLandscapes/randomLandscapes.R:101:5: style: Variable or function name should be lowerCamelCase.

DEM <- gaussMap(template, scale = 300, var = 0.03, speedup = speedup, inMemory = inMemory)
    ^~~

inst/sampleModules/SpaDES_sampleModules/SpaDES_sampleModules.R:17:1: style: Lines should not be more than 100 characters.

​    defineParameter(".plotInitialTime", "numeric", NA_real_, NA, NA, "This describes the simulation time at which the first plot event should occur"),
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

inst/sampleModules/SpaDES_sampleModules/SpaDES_sampleModules.R:18:1: style: Lines should not be more than 100 characters.

​    defineParameter(".saveInitialTime", "numeric", NA_real_, NA, NA, "This describes the simulation time at which the first save event should occur")
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

R/cache.R:130:22: style: Variable or function name should be lowerCamelCase.

obj$.list[[1]]$._startClockTime <- NULL
                     ^~~~~~~~~~~~~~~~

R/cache.R:131:22: style: Variable or function name should be lowerCamelCase.

obj$.list[[1]]$._timestamp <- NULL
                     ^~~~~~~~~~~

R/cache.R:238:50: style: Commas should always have a space after.

​          cat(crayon::blue("  Using ", fromWhere," copy of", cur$moduleName, "module\n"))
                                                 ^

R/cache.R:249:50: style: Commas should always have a space after.

​          cat(crayon::blue("  Using ", fromWhere," copy of", cur$eventType, "event in",
                                                 ^

R/cache.R:299:10: style: Commented code should be removed.

#checkPath(cacheRepo, create = TRUE) #SpaDES dependency
         ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

R/cache.R:352:1: style: Lines should not be more than 100 characters.

isNewObj <- !names(postDigest$.list[[whSimList2]]) %in% names(preDigest[[whSimList]]$.list[[whSimList2]])
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

R/cache.R:357:1: style: Lines should not be more than 100 characters.

pre <- lapply(preDigest[[whSimList]]$.list[[whSimList2]][existingObjs], fastdigest::fastdigest)
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

R/cache.R:436:1: style: Lines should not be more than 100 characters.

#   makes soft copy of all objects, i.e., they have the identical objects, which are pointers only
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

R/cache.R:466:36: style: Put spaces around all infix operators.

if (length(object2@current)==0) { # means it is not in a spades call
                                  ~^~~

R/cache.R:466:41: style: Opening curly braces should never go on their own line and should always be followed by a new line.

if (length(object2@current)==0) { # means it is not in a spades call
                                        ^

R/cache.R:468:15: style: Commented code should be removed.

#   length(unlist(object2@completed, recursive = FALSE))/(length(object2@completed[[1]]))
              ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

R/cache.R:480:63: style: Put spaces around all infix operators.

eventsAddedByThisModule <- events(object)$moduleName==current(object2)$moduleName
                                                             ~^~~

R/cache.R:484:42: style: Opening curly braces should never go on their own line and should always be followed by a new line.

b <- lapply(b, function(x) {x[["order"]] <- 2; x})
                                         ^

R/cache.R:487:42: style: Opening curly braces should never go on their own line and should always be followed by a new line.

d <- lapply(d, function(x) {x[["order"]] <- 1; x})
                                         ^

R/cache.R:494:1: style: Lines should not be more than 100 characters.

#              args = list(append(object@events[eventsAddedByThisModule], object2@events)))
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

R/cache.R:497:56: style: Opening curly braces should never go on their own line and should always be followed by a new line.

object2@events <- lapply(f1, function(f) {f$order <- NULL; f})
                                                       ^

R/cache.R:499:1: style: Lines should not be more than 100 characters.

#                           args = list(append(object@events[eventsAddedByThisModule], object2@events)))
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

R/cache.R:502:12: style: Commented code should be removed.

#object2@events <- unique(rbindlist(list(object@events, object2@events)))
           ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

R/cache.R:506:1: style: Lines should not be more than 100 characters.

# This is for objects that are not in the return environment yet because they are unrelated to the
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

R/cache.R:519:10: style: Place a space before left parenthesis, except in a function call.

for(atts in attrsToGrab) {
         ^

R/cache.R:523:9: style: Commented code should be removed.

# attr(object2, "tags") <- attr(object, "tags")
        ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

R/cache.R:524:9: style: Commented code should be removed.

# attr(object2, "call") <- attr(object, "call")
        ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

R/cache.R:525:9: style: Commented code should be removed.

# attr(object2, "function") <- attr(object, "function")
        ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

R/cache.R:558:66: style: Variable or function name should be lowerCamelCase.

setGeneric(".addTagsToOutput", function(object, outputObjects, FUN) {
                                                                 ^~~

R/cache.R:581:48: style: Variable or function name should be lowerCamelCase.

definition = function(object, outputObjects, FUN, preDigestByClass) {
                                               ^~~

R/cache.R:674:1: style: Variable or function name should be lowerCamelCase.

objSize.simList <- function(x, quick = getOption("reproducible.quick", FALSE)) {
^~~~~~~~~~~~~~~

R/cache.R:701:1: style: Variable or function name should be lowerCamelCase.

makeMemoiseable.simList <- function(x) {
^~~~~~~~~~~~~~~~~~~~~~~

R/cache.R:709:1: style: Variable or function name should be lowerCamelCase.

unmakeMemoiseable.simList_ <- function(x) {
^~~~~~~~~~~~~~~~~~~~~~~~~~

R/check.R:151:7: style: Commented code should be removed.

# modules <- sim@modules
      ^~~~~~~~~~~~~~~~~~~~~~

R/check.R:152:7: style: Commented code should be removed.

# userModules <- modules[-which(coreModules %in% modules)]
      ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

R/checkpoint.R:36:1: style: Variable or function name should be lowerCamelCase.

doEvent.checkpoint <- function(sim, eventTime, eventType, debug = FALSE) {
^~~~~~~~~~~~~~~~~~

R/code-checking.R:86:1: style: Lines should not be more than 100 characters.

xAsCall <- .isLastLineSim(x = x, xAsString = bb[seq(funStarts[yy], funEnds[yy + 1])])
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

R/code-checking.R:90:16: style: Commented code should be removed.

#y = strsplit(bb[funStarts[yy]], split = "\\s+")[[1]][1]
               ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

R/code-checking.R:91:53: style: Commas should always have a space after.

y <- paste0(cantCodeCheckMessage, "'",bb[funStarts[yy]], "'")
                                                    ^

R/code-checking.R:144:39: style: Opening curly braces should never go on their own line and should always be followed by a new line.

if (identical(type, "returnSim")) { # This is intended for only the last line of a function
                                      ^

R/code-checking.R:182:48: style: Do not place spaces around code in parentheses or square brackets.

​      } else if (identical(x[[1]], quote(`<-`)) ) {
                                               ^

R/code-checking.R:185:62: style: Opening curly braces should never go on their own line and should always be followed by a new line.

if (any(grepl(x[[2]][[2]], pattern = ".xData"))) {# i.e., sim@.xData
                                                             ^

R/code-checking.R:202:19: style: Place a space before left parenthesis, except in a function call.

x <- x[-(1:2)]
                  ^

R/code-checking.R:218:29: style: Place a space before left parenthesis, except in a function call.

x[[2]] <- x[[2]][-(1:2)]
                            ^

R/code-checking.R:320:1: style: Lines should not be more than 100 characters.

allChecks[anyCantCodeCheck] <- lapply(names(cantCodeCheck[anyCantCodeCheck]), function(objName) {
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

R/code-checking.R:369:51: style: Commas should always have a space after.

" ",verb," declared in outputObjects, ",
                                                  ^

R/code-checking.R:369:56: style: Commas should always have a space after.

" ",verb," declared in outputObjects, ",
                                                       ^

R/code-checking.R:385:20: style: Commas should always have a space after.

" ",verb," declared in inputObjects, ",
                   ^

R/code-checking.R:385:25: style: Commas should always have a space after.

" ",verb," declared in inputObjects, ",
                        ^

R/code-checking.R:396:90: style: Commas should always have a space after.

​                                       paste0(paste(missingFrmMod, collapse = ", "), " ",verb,
                                                                                         ^

R/code-checking.R:441:75: style: Commas should always have a space after.

" but only for the 'get' functions, not the 'set' function ","
                                                                          ^

R/code-checking.R:455:1: style: Lines should not be more than 100 characters.

missingInMetadata <- simAssignsNotInDotInputObjects[!(simAssignsNotInDotInputObjects %in% outputObjNames)]
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

R/code-checking.R:464:24: style: Commas should always have a space after.

" ",verbs[[fn]]," assigned to sim inside ",
                       ^

R/code-checking.R:464:36: style: Commas should always have a space after.

" ",verbs[[fn]]," assigned to sim inside ",
                                   ^

R/code-checking.R:465:33: style: Commas should always have a space after.

fn, ", but ",verbs[[fn]]," not declared in outputObjects")
                                ^

R/code-checking.R:465:45: style: Commas should always have a space after.

fn, ", but ",verbs[[fn]]," not declared in outputObjects")
                                            ^

R/code-checking.R:472:1: style: Lines should not be more than 100 characters.

missingInMetadata <- simAssignsInDotInputObjects[!(simAssignsInDotInputObjects %in% inputObjNames)]
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

R/code-checking.R:481:24: style: Commas should always have a space after.

" ",verbs[[fn]]," assigned to sim inside ",
                       ^

R/code-checking.R:481:36: style: Commas should always have a space after.

" ",verbs[[fn]]," assigned to sim inside ",
                                   ^

R/code-checking.R:482:33: style: Commas should always have a space after.

fn, ", but ",verbs[[fn]]," not declared in inputObjects")
                                ^

R/code-checking.R:482:45: style: Commas should always have a space after.

fn, ", but ",verbs[[fn]]," not declared in inputObjects")
                                            ^

R/code-checking.R:504:24: style: Commas should always have a space after.

" ",verbs[[fn]]," used from sim inside ",
                       ^

R/code-checking.R:504:36: style: Commas should always have a space after.

" ",verbs[[fn]]," used from sim inside ",
                                   ^

R/code-checking.R:505:33: style: Commas should always have a space after.

fn, ", but ",verbs[[fn]]," not declared in inputObjects")
                                ^

R/code-checking.R:505:45: style: Commas should always have a space after.

fn, ", but ",verbs[[fn]]," not declared in inputObjects")
                                            ^

R/code-checking.R:517:13: style: Commas should always have a space after.

" ",verb," used from sim inside ",
            ^

R/code-checking.R:517:18: style: Commas should always have a space after.

" ",verb," used from sim inside ",
                 ^

R/code-checking.R:519:18: style: Commas should always have a space after.

", but ",verb," not declared in inputObjects"
                 ^

R/code-checking.R:519:23: style: Commas should always have a space after.

", but ",verb," not declared in inputObjects"
                      ^

R/code-checking.R:662:6: style: Commented code should be removed.

#unique(pd[outerWh, "line1"])
     ^~~~~~~~~~~~~~~~~~~~~~~~~~~~

R/code-checking.R:666:34: style: Commas should always have a space after.

whInner <- any((pd[outerWh,"line1"] < lwf) & (pd[outerWh,"line2"] > lwf) )
                                 ^

R/code-checking.R:666:64: style: Commas should always have a space after.

whInner <- any((pd[outerWh,"line1"] < lwf) & (pd[outerWh,"line2"] > lwf) )
                                                               ^

R/code-checking.R:666:79: style: Do not place spaces around code in parentheses or square brackets.

whInner <- any((pd[outerWh,"line1"] < lwf) & (pd[outerWh,"line2"] > lwf) )
                                                                              ^

R/copy.R:37:13: style: Variable or function name should be lowerCamelCase.

sim_ <- object
            ^~~~

R/downloadData.R:54:96: style: Do not place spaces around code in parentheses or square brackets.

io <- .parseModulePartial(sim, modules = list(module), defineModuleElement = "inputObjects" )
                                                                                               ^

R/downloadData.R:244:7: style: Commented code should be removed.

# parsedModule <- parse(file = file.path(path, module, paste0(module, '.R')))
      ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

R/downloadData.R:245:7: style: Commented code should be removed.

# urls <- .getSourceURL(pattern = fileToDownload, x = parsedModule)
      ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

R/downloadData.R:252:8: style: Commented code should be removed.

#urls <- moduleMetadata(module, path)$inputObjects$sourceURL
       ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

R/downloadData.R:277:27: style: Commas should always have a space after.

chksums2 <- chksums[0,]
                          ^

R/downloadData.R:278:6: style: Commented code should be removed.

#children <- moduleMetadata(module, path)$childModules
     ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

R/downloadData.R:281:13: style: Do not place spaces around code in parentheses or square brackets.

if ( all( nzchar(children) & !is.na(children) ) ) {
            ^

R/downloadData.R:281:18: style: Do not place spaces around code in parentheses or square brackets.

if ( all( nzchar(children) & !is.na(children) ) ) {
                 ^

R/downloadData.R:281:54: style: Do not place spaces around code in parentheses or square brackets.

if ( all( nzchar(children) & !is.na(children) ) ) {
                                                     ^

R/downloadData.R:281:56: style: Do not place spaces around code in parentheses or square brackets.

if ( all( nzchar(children) & !is.na(children) ) ) {
                                                       ^

R/experiment.R:214:7: style: Commented code should be removed.

# cl <- tryCatch(getCluster(), error = function(x) NULL)
      ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

R/experiment.R:215:7: style: Commented code should be removed.

# on.exit(if (!is.null(cl)) returnCluster(), add = TRUE)
      ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

R/experiment.R:217:6: style: Commented code should be removed.

#if (length(modules) == 0) modules <- list(modules(sim)[-(1:4)])
     ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

R/experiment.R:221:11: style: Commented code should be removed.

# unlist(params[paramsTmp], recursive = FALSE)
          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

R/experiment.R:313:58: style: Commented code should be removed.

​            params(sim_)[[mod[x]]][[param[[x]]]] <- val #factorialExp[ind,x]
                                                         ^~~~~~~~~~~~~~~~~~~

R/experiment.R:356:11: style: Variable or function name should be lowerCamelCase.

sim_ <- sim
          ^~~~

R/helpers.R:232:74: style: Place a space before left parenthesis, except in a function call.

​                             paste0("package:", .pkgEnv$corePackagesVec[-(1:2)]))
                                                                         ^

R/helpers.R:264:1: style: Variable or function name should be lowerCamelCase.

all.equal.simList <- function(target, current, ...) {
^~~~~~~~~~~~~~~~~

R/helpers.R:280:5: style: Commented code should be removed.

# suppressWarnings(rm("._startClockTime", envir = envir(target)))
    ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

R/helpers.R:281:5: style: Commented code should be removed.

# suppressWarnings(rm("._startClockTime", envir = envir(current)))
    ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

R/helpers.R:282:5: style: Commented code should be removed.

# suppressWarnings(rm("._firstEventClockTime", envir = envir(target)))
    ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

R/helpers.R:283:5: style: Commented code should be removed.

# suppressWarnings(rm("._firstEventClockTime", envir = envir(current)))
    ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

R/helpers.R:284:5: style: Commented code should be removed.

# suppressWarnings(rm(".timestamp", envir = envir(target)))
    ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

R/helpers.R:285:5: style: Commented code should be removed.

# suppressWarnings(rm(".timestamp", envir = envir(current)))
    ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

R/load.R:198:1: style: Lines should not be more than 100 characters.

​                names(argument) <- c(nam, names(formals(getFromNamespace(loadFun[y], loadPackage[y])))[1])
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

R/misc-methods.R:466:55: style: Do not place spaces around code in parentheses or square brackets.

​          (inherits(get(w, envir = envir), "integer")) ) {
                                                      ^

R/misc-methods.R:633:1: style: Variable or function name should be lowerCamelCase.

Paths <- .paths()
^~~~~

R/misc-methods.R:651:23: style: Remove spaces before the left parenthesis in a function call.

.basename <- function (x) {
                      ^

R/module-define.R:744:63: style: Do not place spaces around code in parentheses or square brackets.

exts <- na.omit(match(file_ext(fl), .fileExts[, "exts"]) )
                                                              ^

R/module-dependencies-class.R:53:13: style: Variable or function name should be lowerCamelCase.

out.df <- data.frame(
            ^~~~~~

R/module-dependencies-class.R:171:9: style: Do not place spaces around code in parentheses or square brackets.

if ( !all(colnames(._outputObjectsDF()) %in% colnames(object@outputObjects)) ) {
        ^

R/module-dependencies-class.R:171:81: style: Do not place spaces around code in parentheses or square brackets.

if ( !all(colnames(._outputObjectsDF()) %in% colnames(object@outputObjects)) ) {
                                                                                ^

R/module-dependencies-methods.R:43:5: style: Variable or function name should be lowerCamelCase.

DT <- .depsEdgeListMem(deps, plot)
    ^~

R/module-dependencies-methods.R:56:3: style: Variable or function name should be lowerCamelCase.

sim.in <- sim.out <- data.table(objectName = character(0),
  ^~~~~~

R/module-dependencies-methods.R:56:13: style: Variable or function name should be lowerCamelCase.

sim.in <- sim.out <- data.table(objectName = character(0),
            ^~~~~~~

R/module-dependencies-methods.R:61:7: style: Variable or function name should be lowerCamelCase.

z.in <- as.data.table(x@inputObjects)[, .(objectName, objectClass)]
      ^~~~

R/module-dependencies-methods.R:62:7: style: Variable or function name should be lowerCamelCase.

z.out <- as.data.table(x@outputObjects)[, .(objectName, objectClass)]
      ^~~~~

R/module-dependencies-methods.R:65:9: style: Variable or function name should be lowerCamelCase.

sim.in <<- rbindlist(list(sim.in, z.in), use.names = TRUE)
        ^~~~~~

R/module-dependencies-methods.R:68:9: style: Variable or function name should be lowerCamelCase.

sim.out <<- rbindlist(list(sim.out, z.out), use.names = TRUE)
        ^~~~~~~

R/module-dependencies-methods.R:80:5: style: Variable or function name should be lowerCamelCase.

DT <- dx[, list(from = module, to = i.module,
    ^~

R/module-dependencies-methods.R:83:15: style: Variable or function name should be lowerCamelCase.

if (plot) DT <- DT[!duplicated(DT[, 1:2, with = FALSE]), ]
              ^~

R/module-dependencies-methods.R:85:5: style: Variable or function name should be lowerCamelCase.

DT <- data.table(from = character(0), to = character(0),
    ^~

R/module-dependencies-methods.R:162:5: style: Variable or function name should be lowerCamelCase.

M <- distances(simGraph, mode = "out")
    ^

R/module-dependencies-methods.R:194:39: style: %>% should always have a space before it and a new line after it, unless the full pipeline fits on one line.

missingObjects <- simEdgeList %>% filter(from != to) %>%
                                    ~~^

R/module-dependencies-methods.R:208:26: style: %>% should always have a space before it and a new line after it, unless the full pipeline fits on one line.

return(newEdgeList %>% data.table() %>% setorder("from", "to", "objName"))

Please sign in to comment.