Permalink
Browse files

[to review] possible fix for #80

@eliotmcintire, i'll keep this commented out for now until we can both come back to it

NOTE: using `unlockBinding()` generates R CMD check NOTE and likely would get pushback from CRAN
  • Loading branch information...
achubaty committed Oct 11, 2018
1 parent 6a4d896 commit 1a7a8c8a2f3187bb9d88c98d4a9318f787fe5d5e
Showing with 4 additions and 1 deletion.
  1. +4 −1 R/simulation-parseModule.R
@@ -205,8 +205,11 @@ setMethod(
doesntUseNamespacing <- !.isNamespaced(sim, m)
# evaluate the rest of the parsed file
if (doesntUseNamespacing)
if (doesntUseNamespacing) {
#lockBinding(m, sim@.envir) ## guard against clobbering from module code (#80)
eval(tmp[["parsedFile"]][!tmp[["defineModuleItem"]]], envir = sim@.envir)
#unlockBinding(m, sim@.envir) ## will be re-locked later on
}
# attach source code to simList in a hidden spot
opt <- getOption("spades.moduleCodeChecks")

1 comment on commit 1a7a8c8

@lintr-bot

This comment has been minimized.

Show comment
Hide comment
@lintr-bot

lintr-bot Oct 11, 2018

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:128:22: style: Variable or function name should be lowerCamelCase.

obj$.list$.envir$._startClockTime <- NULL
                     ^~~~~~~~~~~~~~~~

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

obj$.list$.envir$._timestamp <- NULL
                     ^~~~~~~~~~~

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

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

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

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

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

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

R/cache.R:420: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:448:1: style: Lines should not be more than 100 characters.

​        list2env(mget(lsObjectEnv[lsObjectEnv %in% createOutputs | lsObjectEnv %in% expectsInputs], envir = object@.envir), envir = object2@.envir)
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

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

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

R/cache.R:449: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:451:15: style: Commented code should be removed.

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

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

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

R/cache.R:469: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:482:10: style: Place a space before left parenthesis, except in a function call.

for(atts in attrsToGrab) {
         ^

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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 = ".envir"))) {# i.e., sim@.envir
                                                             ^

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:200:6: style: Commented code should be removed.

#sim <- Copy(sim, objects = FALSE, queues = TRUE)
     ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

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

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

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

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

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

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

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

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

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

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

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:465:55: style: Do not place spaces around code in parentheses or square brackets.

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

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

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

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:163:5: style: Variable or function name should be lowerCamelCase.

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

R/module-dependencies-methods.R:195: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:209: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"))
                       ~~^

R/module-dependencies-methods.R:245:79: style: Do not place spaces around code in parentheses or square brackets.

loadOrder <- names(simGraph[[tsort, ]]) %>% .[!(. %in% "_INPUT_" )]
                                                                              ^

R/module-repository.R:28:1: style: Lines should not be more than 100 characters.

#'          (\url{http://spades-core.predictiveecology.org/articles/ii-modules.html#module-directory-structure-modulename}),
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

R/module-repository.R:52:1: style: Lines should not be more than 100 characters.

zipFiles <- grep(file.path(name, "data"), zipFiles, invert = TRUE, value = TRUE) # remove any zip in data folder
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

R/module-repository.R:294:8: style: Commented code should be removed.

#versionWarning(name, version)
       ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~

R/module-repository.R:306:1: style: Lines should not be more than 100 characters.

​        GET(zip, ua, config = list(config(token = pat)), write_disk(localzip, overwrite = overwrite))
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

R/module-repository.R:402:1: style: Trailing blank lines are superfluous.

^

R/module-repository.R:403:1: style: Trailing blank lines are superfluous.

^

R/moduleMetadata.R:75:6: style: Commented code should be removed.

#metadata <- eval(parse(text = x)) # can't be used because can't evaluate start(sim)
     ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

R/plotting-diagrams.R:78:5: style: Variable or function name should be lowerCamelCase.

DT <- tail(completed(sim), n)
    ^~

lintr-bot commented on 1a7a8c8 Oct 11, 2018

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:128:22: style: Variable or function name should be lowerCamelCase.

obj$.list$.envir$._startClockTime <- NULL
                     ^~~~~~~~~~~~~~~~

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

obj$.list$.envir$._timestamp <- NULL
                     ^~~~~~~~~~~

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

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

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

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

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

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

R/cache.R:420: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:448:1: style: Lines should not be more than 100 characters.

​        list2env(mget(lsObjectEnv[lsObjectEnv %in% createOutputs | lsObjectEnv %in% expectsInputs], envir = object@.envir), envir = object2@.envir)
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

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

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

R/cache.R:449: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:451:15: style: Commented code should be removed.

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

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

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

R/cache.R:469: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:482:10: style: Place a space before left parenthesis, except in a function call.

for(atts in attrsToGrab) {
         ^

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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 = ".envir"))) {# i.e., sim@.envir
                                                             ^

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:200:6: style: Commented code should be removed.

#sim <- Copy(sim, objects = FALSE, queues = TRUE)
     ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

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

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

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

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

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

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

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

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

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

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

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:465:55: style: Do not place spaces around code in parentheses or square brackets.

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

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

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

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:163:5: style: Variable or function name should be lowerCamelCase.

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

R/module-dependencies-methods.R:195: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:209: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"))
                       ~~^

R/module-dependencies-methods.R:245:79: style: Do not place spaces around code in parentheses or square brackets.

loadOrder <- names(simGraph[[tsort, ]]) %>% .[!(. %in% "_INPUT_" )]
                                                                              ^

R/module-repository.R:28:1: style: Lines should not be more than 100 characters.

#'          (\url{http://spades-core.predictiveecology.org/articles/ii-modules.html#module-directory-structure-modulename}),
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

R/module-repository.R:52:1: style: Lines should not be more than 100 characters.

zipFiles <- grep(file.path(name, "data"), zipFiles, invert = TRUE, value = TRUE) # remove any zip in data folder
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

R/module-repository.R:294:8: style: Commented code should be removed.

#versionWarning(name, version)
       ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~

R/module-repository.R:306:1: style: Lines should not be more than 100 characters.

​        GET(zip, ua, config = list(config(token = pat)), write_disk(localzip, overwrite = overwrite))
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

R/module-repository.R:402:1: style: Trailing blank lines are superfluous.

^

R/module-repository.R:403:1: style: Trailing blank lines are superfluous.

^

R/moduleMetadata.R:75:6: style: Commented code should be removed.

#metadata <- eval(parse(text = x)) # can't be used because can't evaluate start(sim)
     ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

R/plotting-diagrams.R:78:5: style: Variable or function name should be lowerCamelCase.

DT <- tail(completed(sim), n)
    ^~
Please sign in to comment.