Permalink
Browse files

use CRAN version of 'Rcpp' following CRAN update

no longer need to use the GitHub version
  • Loading branch information...
achubaty committed Jul 17, 2017
1 parent 229e853 commit 99364368d74fa916c6d6bce3fcc93b6926717cb1
Showing with 3 additions and 5 deletions.
  1. +1 −2 .travis.yml
  2. +2 −3 DESCRIPTION
View
@@ -33,8 +33,7 @@ matrix:
- sh -e /etc/init.d/xvfb start
- Rscript -e 'install.packages("dplyr", dependencies = TRUE)'
after_success:
- Rscript -e 'library(covr); coveralls(coverage = print(package_coverage(quiet
= FALSE)))'
- Rscript -e 'library(covr); coveralls(coverage = print(package_coverage(quiet = FALSE)))'
- Rscript -e 'library(lintr); lint_package()'
- os: linux
dist: trusty
View
@@ -5,7 +5,7 @@ Description: TO DO.
URL:
http://spades.predictiveecology.org,
https://github.com/PredictiveEcology/SpaDES.tools
Date: 2017-07-07
Date: 2017-07-17
Version: 0.1.0
Authors@R: c(
person("Alex M", "Chubaty", email = "alexander.chubaty@canada.ca",
@@ -57,8 +57,7 @@ Extends: SpaDES.core
LinkingTo: Rcpp
Remotes:
PredictiveEcology/reproducible@development,
PredictiveEcology/quickPlot,
RcppCore/Rcpp
PredictiveEcology/quickPlot
License: GPL-3
VignetteBuilder: knitr, rmarkdown
BugReports: https://github.com/PredictiveEcology/SpaDES.tools/issues

1 comment on commit 9936436

@lintr-bot

This comment has been minimized.

lintr-bot commented on 9936436 Jul 17, 2017

inst/examples/example_cir.R:21:1: style: Variable or function name should be lowerCamelCase.

N <- 2
^

inst/examples/example_cir.R:43:1: style: Variable or function name should be lowerCamelCase.

N <- 2
^

inst/examples/example_cir.R:82:1: style: Variable or function name should be lowerCamelCase.

N <- 2
^

inst/examples/example_distanceFromEachPoint.R:4:1: style: Variable or function name should be lowerCamelCase.

N <- 2
^

inst/examples/example_distanceFromEachPoint.R:32:1: style: Variable or function name should be lowerCamelCase.

N <- 15
^

inst/examples/example_distanceFromEachPoint.R:37:3: style: Commented code should be removed.

# beginCluster(3) # can do parallel
  ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

inst/examples/example_distanceFromEachPoint.R:40:3: style: Commented code should be removed.

# endCluster() # if beginCluster was run
  ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

inst/examples/example_mapReduce.R:5:1: style: Variable or function name should be lowerCamelCase.

Ras <- raster(extent(0, 15, 0, 15), res = 1)
^~~

inst/examples/example_mapReduce.R:10:53: style: Commas should always have a space after.

communities = sample(1:1000,length(uniqueComms)),
                                                    ^

inst/examples/example_rings.R:12:1: style: Variable or function name should be lowerCamelCase.

Rings <- rings(emptyRas, loci = loci, allowOverlap = TRUE, returnIndices = TRUE)
^~~~~

inst/examples/example_rings.R:23:1: style: Variable or function name should be lowerCamelCase.

Rings <- rings(emptyRas, loci = loci, minRadius = 7, maxRadius = 9, returnIndices = TRUE)
^~~~~

inst/examples/example_rings.R:32:1: style: Variable or function name should be lowerCamelCase.

Rings <- rings(emptyRas, loci = loci, minRadius = c(0, 7), maxRadius = c(8, 18),
^~~~~

inst/examples/example_spokes.R:7:1: style: Variable or function name should be lowerCamelCase.

Ras <- raster(extent(0, 10, 0, 10), res = 1, val = 0)
^~~

inst/examples/example_spokes.R:15:1: style: Variable or function name should be lowerCamelCase.

N <- 2
^

inst/examples/example_spokes.R:31:5: style: Commented code should be removed.

# Plot(rasB, addTo = "rp", zero.color = "transparent", cols = "black")
    ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

inst/examples/example_spread.R:56:2: style: Commented code should be removed.

## Interrupt a spread event using iterations - need `returnIndices = TRUE`` to use outputs
 ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

inst/examples/example_spread.R:107:1: style: Variable or function name should be lowerCamelCase.

stopRuleB_NotExact <- spread(hab, loci = as.integer(sample(1:ncell(hab), 10)), 1, 0,
^~~~~~~~~~~~~~~~~~

inst/examples/example_spread.R:181:1: style: Variable or function name should be lowerCamelCase.

TwoCirclesDiffSize <- spread(hab, spreadProb = 1, loci = initialLoci, circle = TRUE,
^~~~~~~~~~~~~~~~~~

inst/examples/example_spread.R:204:1: style: Variable or function name should be lowerCamelCase.

TwoCirclesDiffSize <- spread(hab, spreadProb = 1, loci = initialLoci, circle = TRUE,
^~~~~~~~~~~~~~~~~~

inst/examples/example_spread.R:259:2: style: Commented code should be removed.

##  contained on hab layer. Note, `neighProbs = c(0,1)`` forces each active pixel
 ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

inst/examples/example_spread.R:260:2: style: Commented code should be removed.

##  to move to 2 new pixels (`prob = 0`` for 1 neighbour, `prob = 1`` for 2 neighbours)
 ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

inst/examples/example_spread2.R:86:3: style: Variable or function name should be lowerCamelCase.

N <- 100
  ^

inst/examples/example_spread2.R:106:25: style: Variable or function name should be lowerCamelCase.

objFn <- function(sp, N = 20, ras, goalSize) {
                        ^

R/distanceFromEachPoint.R:128:13: style: Place a space before left parenthesis, except in a function call.

if ((any(otherFromCols) | isTRUE(angles))  ) {
            ^

R/distanceFromEachPoint.R:128:51: style: Do not place spaces around code in parentheses or square brackets.

if ((any(otherFromCols) | isTRUE(angles))  ) {
                                                  ^

R/distanceFromEachPoint.R:210:50: style: Commas should never have a space before.

parFunArgs <- list(cl = cl, x = seqLen , fun = parFunFun)
                                                ~^

R/distanceFromEachPoint.R:298:1: style: Lines should not be more than 100 characters.

#' This version can often be faster for a single point because it does not return a RasterLayer. This is
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

R/distanceFromEachPoint.R:300:1: style: Lines should not be more than 100 characters.

#' distance from the set of points to all cells. Rather this returns the every pair-wise point distance.
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

R/distanceFromEachPoint.R:301:1: style: Lines should not be more than 100 characters.

#' As a result, this can be used for doing inverse distance weightings, seed rain, cumulative effects
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

R/initialize.R:246:3: style: Commented code should be removed.

# ### INCORPORATE RELEVANT PARTS OF THIS OLD INIT FUNCTION INTO INITCOORDS()
  ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

R/initialize.R:251:3: style: Commented code should be removed.

# #'                      (currently only \code{RasterLayer} or
  ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

R/initialize.R:252:3: style: Commented code should be removed.

# #'                      \code{SpatialPolygonsDataFrame}) accepted.
  ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

R/initialize.R:262:7: style: Commented code should be removed.

#     ext <- extent(agentlocation)
      ^~~~~~~~~~~~~~~~~~~~~~~~~~~~

R/initialize.R:264:9: style: Commented code should be removed.

#       #            nonNAs <- !is.na(getvalue(probinit))
        ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

R/initialize.R:265:9: style: Commented code should be removed.

#       nonNAs <- !is.na(getValues(probinit))
        ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

R/initialize.R:266:9: style: Commented code should be removed.

#       wh.nonNAs <- which(nonNAs)
        ^~~~~~~~~~~~~~~~~~~~~~~~~~

R/initialize.R:267:9: style: Commented code should be removed.

#       #            ProbInit.v <- cumsum(getvalue(probinit)[nonNAs])
        ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

R/initialize.R:268:9: style: Commented code should be removed.

#       ProbInit.v <- cumsum(getValues(probinit)[nonNAs])
        ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

R/initialize.R:270:11: style: Commented code should be removed.

#         ran <- runif(numagents,0,1)
          ^~~~~~~~~~~~~~~~~~~~~~~~~~~

R/initialize.R:271:11: style: Commented code should be removed.

#         fI <- findInterval(ran, ProbInit.v)+1
          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

R/initialize.R:272:11: style: Commented code should be removed.

#         fI2 <- wh.nonNAs[fI]
          ^~~~~~~~~~~~~~~~~~~~

R/initialize.R:273:11: style: Commented code should be removed.

#         last.ran <- runif(numagents,0,1)
          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

R/initialize.R:274:11: style: Commented code should be removed.

#         last.fI <- findInterval(last.ran, ProbInit.v)+1
          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

R/initialize.R:275:11: style: Commented code should be removed.

#         last.fI2 <- wh.nonNAs[last.fI]
          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

R/initialize.R:277:11: style: Commented code should be removed.

#         #                va <- getvalue(probinit)[nonNAs]
          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

R/initialize.R:278:11: style: Commented code should be removed.

#         va <- getValues(probinit)[nonNAs]
          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

R/initialize.R:279:11: style: Commented code should be removed.

#         ran <- runif(length(va), 0, 1)
          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

R/initialize.R:280:11: style: Commented code should be removed.

#         fI2 <- wh.nonNAs[ran<va]
          ^~~~~~~~~~~~~~~~~~~~~~~~

R/initialize.R:282:11: style: Commented code should be removed.

#         last.ran <- runif(length(fI2), 0, 1)
          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

R/initialize.R:283:11: style: Commented code should be removed.

#         last.fI <- findInterval(last.ran, ProbInit.v) + 1
          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

R/initialize.R:284:11: style: Commented code should be removed.

#         last.fI2 <- wh.nonNAs[last.fI]
          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

R/initialize.R:286:11: style: Commented code should be removed.

#         #                last.ran <- runif(length(fI2),0,1)
          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

R/initialize.R:287:11: style: Commented code should be removed.

#         #                last.fI2 <- wh.nonNAs[last.ran<va]
          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

R/initialize.R:290:11: style: Commented code should be removed.

#         position <- xyFromCell(agentlocation,fI2,spatial = TRUE)
          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

R/initialize.R:292:11: style: Commented code should be removed.

#         position <- coordinates(agentlocation)
          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

R/initialize.R:294:11: style: Commented code should be removed.

#         stop("need raster layer or Spatial Points object")
          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

R/initialize.R:296:9: style: Commented code should be removed.

#       numagents <- length(position)
        ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~

R/initialize.R:302:1: style: Lines should not be more than 100 characters.

#           xy = matrix(runif(numagents*2, c(xmin(ext), ymin(ext)), c(xmax(ext), ymax(ext))), ncol = 2, byrow = TRUE)
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

R/initialize.R:302:13: style: Commented code should be removed.

#           xy = matrix(runif(numagents*2, c(xmin(ext), ymin(ext)), c(xmax(ext), ymax(ext))), ncol = 2, byrow = TRUE)
            ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

R/initialize.R:303:13: style: Commented code should be removed.

#           colnames(xy) = c("x", "y")
            ^~~~~~~~~~~~~~~~~~~~~~~~~~

R/initialize.R:304:13: style: Commented code should be removed.

#           position <- SpatialPoints(xy)
            ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~

R/initialize.R:305:1: style: Lines should not be more than 100 characters.

#           #                    position <- SpatialPoints(sampleRandom(agentlocation, numagents, xy = TRUE, sp = TRUE))
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

R/initialize.R:305:13: style: Commented code should be removed.

#           #                    position <- SpatialPoints(sampleRandom(agentlocation, numagents, xy = TRUE, sp = TRUE))
            ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

R/initialize.R:307:13: style: Commented code should be removed.

#           sam <- sample(1:length(agentlocation),numagents)
            ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

R/initialize.R:308:13: style: Commented code should be removed.

#           position <- SpatialPoints(agentlocation[sam,])
            ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

R/initialize.R:310:13: style: Commented code should be removed.

#           stop("need raster layer or Spatial Points object")
            ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

R/initialize.R:314:13: style: Commented code should be removed.

#           position <- SpatialPoints(xyFromCell(agentlocation, Which(agentlocation, cells = TRUE)))
            ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

R/initialize.R:316:13: style: Commented code should be removed.

#           position <- SpatialPoints(agentlocation)
            ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

R/initialize.R:318:13: style: Commented code should be removed.

#           stop("need raster layer or Spatial Points object")
            ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

R/initialize.R:320:11: style: Commented code should be removed.

#         numagents <- length(position)
          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~

R/initialize.R:326:11: style: Commented code should be removed.

#         position <- SpatialPoints(dotsInPolys(agentlocation,as.integer(round(numagents*pri,0))))
          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

R/initialize.R:327:11: style: Commented code should be removed.

#         numagents <- length(position)
          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~

R/initialize.R:330:1: style: Lines should not be more than 100 characters.

#   } else if (is.null(agentlocation)) { stop("Need to provide agentlocation, which can be a map layer")
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

R/initialize.R:332:5: style: Commented code should be removed.

#   heading1 <- runif(numagents, 0, 360)
    ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

R/initialize.R:333:5: style: Commented code should be removed.

#   distance <- runif(numagents, 0.1, 10)
    ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

R/initialize.R:335:5: style: Commented code should be removed.

#   .Object@ID <- as.character(1:numagents)
    ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

R/initialize.R:336:5: style: Commented code should be removed.

#   .Object@spatial <- position
    ^~~~~~~~~~~~~~~~~~~~~~~~~~~

R/initialize.R:337:5: style: Commented code should be removed.

#   .Object@heading <- heading1
    ^~~~~~~~~~~~~~~~~~~~~~~~~~~

R/initialize.R:338:5: style: Commented code should be removed.

#   .Object@distance <- distance
    ^~~~~~~~~~~~~~~~~~~~~~~~~~~~

R/initialize.R:340:5: style: Commented code should be removed.

#   return(.Object)
    ^~~~~~~~~~~~~~~

R/mapReduce.R:52:38: style: Variable or function name should be lowerCamelCase.

fullRasterVals <- fullRasterVals[, row_number := 1L:.N]
                                     ^~~~~~~~~~

R/mapReduce.R:55:3: style: Variable or function name should be lowerCamelCase.

BsumVec <- reduced[fullRasterVals] # join
  ^~~~~~~

R/mergeRaster.R:34:37: style: %>% should always have a space before it and a new line after it, unless the full pipeline fits on one line.

xminExtent <- sapply(x, xmin) %>% unique() %>% sort()
                                  ~~^

R/mergeRaster.R:35:37: style: %>% should always have a space before it and a new line after it, unless the full pipeline fits on one line.

xmaxExtent <- sapply(x, xmax) %>% unique() %>% sort()
                                  ~~^

R/mergeRaster.R:36:37: style: %>% should always have a space before it and a new line after it, unless the full pipeline fits on one line.

yminExtent <- sapply(x, ymin) %>% unique() %>% sort()
                                  ~~^

R/mergeRaster.R:37:37: style: %>% should always have a space before it and a new line after it, unless the full pipeline fits on one line.

ymaxExtent <- sapply(x, ymax) %>% unique() %>% sort()
                                  ~~^

R/mergeRaster.R:38:23: style: Do not place spaces around code in parentheses or square brackets.

xBuffer <- unique( (xmaxExtent[-length(xmaxExtent)] - xminExtent[-1]) / 2)
                      ^

R/mergeRaster.R:39:23: style: Do not place spaces around code in parentheses or square brackets.

yBuffer <- unique( (ymaxExtent[-length(ymaxExtent)] - yminExtent[-1]) / 2)
                      ^

R/movement.R:19:7: style: Commented code should be removed.

#if (hypothesis == "TwoDT") move <- "TwoDT"
      ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

R/movement.R:21:29: style: Do not place spaces around code in parentheses or square brackets.

if (is.null(hypothesis) ) stop("Must specify a movement hypothesis")
                            ^

R/movement.R:61:1: style: Lines should not be more than 100 characters.

#' @references Turchin, P. 1998. Quantitative analysis of movement: measuring and modeling population redistribution in animals and plants. Sinauer Associates, Sunderland, MA.
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

R/movement.R:63:1: style: Lines should not be more than 100 characters.

#' @references McIntire, E. J. B., C. B. Schultz, and E. E. Crone. 2007. Designing a network for butterfly habitat restoration: where individuals, populations and landscapes interact. Journal of Applied Ecology 44:725-736.
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

R/neighbourhood.R:78:1: style: Lines should not be more than 100 characters.

#'                 This will be faster for situations where \code{cutoff.for.data.table} is \code{TRUE}
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

R/neighbourhood.R:109:1: style: Variable or function name should be lowerCamelCase.

adj.raw <- function(x = NULL, cells, directions = 8, sort = FALSE, pairs = TRUE,
^~~~~~~

R/neighbourhood.R:111:21: style: Variable or function name should be lowerCamelCase.

match.adjacent = FALSE, cutoff.for.data.table = 2e3,
                    ^~~~~~~~~~~~~~

R/neighbourhood.R:111:45: style: Variable or function name should be lowerCamelCase.

match.adjacent = FALSE, cutoff.for.data.table = 2e3,
                                            ^~~~~~~~~~~~~~~~~~~~~

R/neighbourhood.R:114:3: style: Variable or function name should be lowerCamelCase.

J <- NULL
  ^

R/neighbourhood.R:229:13: style: Place a space before left parenthesis, except in a function call.

!((((adj[, "to"] - 1) %% numCell + 1) != adj[, "to"]) |  #top or bottom of raster
            ^

R/neighbourhood.R:229:14: style: Place a space before left parenthesis, except in a function call.

!((((adj[, "to"] - 1) %% numCell + 1) != adj[, "to"]) |  #top or bottom of raster
             ^

R/neighbourhood.R:229:15: style: Place a space before left parenthesis, except in a function call.

!((((adj[, "to"] - 1) %% numCell + 1) != adj[, "to"]) |  #top or bottom of raster
              ^

R/neighbourhood.R:230:1: style: Lines should not be more than 100 characters.

​              ((adj[, "from"] %% numCol + adj[, "to"] %% numCol) == 1))# | #right & left edge cells, with neighbours wrapped
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

R/neighbourhood.R:230:16: style: Place a space before left parenthesis, except in a function call.

​              ((adj[, "from"] %% numCol + adj[, "to"] %% numCol) == 1))# | #right & left edge cells, with neighbours wrapped
               ^

R/neighbourhood.R:234:13: style: Place a space before left parenthesis, except in a function call.

!((((adj[, "to"] - 1) %% numCell + 1) != adj[, "to"]) |  #top or bottom of raster
            ^

R/neighbourhood.R:234:14: style: Place a space before left parenthesis, except in a function call.

!((((adj[, "to"] - 1) %% numCell + 1) != adj[, "to"]) |  #top or bottom of raster
             ^

R/neighbourhood.R:234:15: style: Place a space before left parenthesis, except in a function call.

!((((adj[, "to"] - 1) %% numCell + 1) != adj[, "to"]) |  #top or bottom of raster
              ^

R/neighbourhood.R:235:1: style: Lines should not be more than 100 characters.

​              ((adj[, "from"] %% numCol + adj[, "to"] %% numCol) == 1))# | #right & left edge cells, with neighbours wrapped
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

R/neighbourhood.R:235:16: style: Place a space before left parenthesis, except in a function call.

​              ((adj[, "from"] %% numCol + adj[, "to"] %% numCol) == 1))# | #right & left edge cells, with neighbours wrapped
               ^

R/neighbourhood.R:244:1: style: Lines should not be more than 100 characters.

adj[whLefRig, "to"] <- adj[whLefRig, "to"] + numCol*(adj[whLefRig, "from"] - adj[whLefRig, "to"])
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

R/neighbourhood.R:244:58: style: Put spaces around all infix operators.

adj[whLefRig, "to"] <- adj[whLefRig, "to"] + numCol*(adj[whLefRig, "from"] - adj[whLefRig, "to"])
                                                        ~^~

R/neighbourhood.R:244:59: style: Place a space before left parenthesis, except in a function call.

adj[whLefRig, "to"] <- adj[whLefRig, "to"] + numCol*(adj[whLefRig, "from"] - adj[whLefRig, "to"])
                                                          ^

R/neighbourhood.R:245:20: style: Place a space before left parenthesis, except in a function call.

whBotTop <- ((adj[, "to"] - 1) %% numCell + 1) != adj[, "to"]
                   ^

R/neighbourhood.R:246:1: style: Lines should not be more than 100 characters.

adj[whBotTop, "to"] <- adj[whBotTop, "to"] + sign(adj[whBotTop, "from"] - adj[whBotTop, "to"]) * numCell
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

R/neighbourhood.R:291:13: style: Place a space before left parenthesis, except in a function call.

!((((to - 1) %% numCell + 1) != to) |  #top or bottom of raster
            ^

R/neighbourhood.R:291:14: style: Place a space before left parenthesis, except in a function call.

!((((to - 1) %% numCell + 1) != to) |  #top or bottom of raster
             ^

R/neighbourhood.R:291:15: style: Place a space before left parenthesis, except in a function call.

!((((to - 1) %% numCell + 1) != to) |  #top or bottom of raster
              ^

R/neighbourhood.R:292:1: style: Lines should not be more than 100 characters.

​              ((from %% numCol + to %% numCol) == 1))# | #right & left edge cells, with neighbours wrapped
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

R/neighbourhood.R:292:16: style: Place a space before left parenthesis, except in a function call.

​              ((from %% numCol + to %% numCol) == 1))# | #right & left edge cells, with neighbours wrapped
               ^

R/neighbourhood.R:295:13: style: Place a space before left parenthesis, except in a function call.

if(returnDT)
            ^

R/neighbourhood.R:296:32: style: Commas should always have a space after.

return(unique(adj[,list(to)]))
                               ^

R/neighbourhood.R:301:11: style: Place a space before left parenthesis, except in a function call.

if(returnDT)
          ^

R/neighbourhood.R:306:11: style: Place a space before left parenthesis, except in a function call.

if(returnDT)
          ^

R/neighbourhood.R:308:15: style: Place a space before left parenthesis, except in a function call.

!((((to - 1) %% numCell + 1) != to) | #top or bottom of raster
              ^

R/neighbourhood.R:308:16: style: Place a space before left parenthesis, except in a function call.

!((((to - 1) %% numCell + 1) != to) | #top or bottom of raster
               ^

R/neighbourhood.R:308:17: style: Place a space before left parenthesis, except in a function call.

!((((to - 1) %% numCell + 1) != to) | #top or bottom of raster
                ^

R/neighbourhood.R:309:1: style: Lines should not be more than 100 characters.

​                ((from %% numCol + to %% numCol) == 1)) # | #right & left edge cells, with neighbours wrapped
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

R/neighbourhood.R:309:18: style: Place a space before left parenthesis, except in a function call.

​                ((from %% numCol + to %% numCol) == 1)) # | #right & left edge cells, with neighbours wrapped
                 ^

R/neighbourhood.R:313:15: style: Place a space before left parenthesis, except in a function call.

!((((to - 1) %% numCell + 1) != to) | #top or bottom of raster
              ^

R/neighbourhood.R:313:16: style: Place a space before left parenthesis, except in a function call.

!((((to - 1) %% numCell + 1) != to) | #top or bottom of raster
               ^

R/neighbourhood.R:313:17: style: Place a space before left parenthesis, except in a function call.

!((((to - 1) %% numCell + 1) != to) | #top or bottom of raster
                ^

R/neighbourhood.R:314:1: style: Lines should not be more than 100 characters.

​                ((from %% numCol + to %% numCol) == 1)) # | #right & left edge cells, with neighbours wrapped
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

R/neighbourhood.R:314:18: style: Place a space before left parenthesis, except in a function call.

​                ((from %% numCol + to %% numCol) == 1)) # | #right & left edge cells, with neighbours wrapped
                 ^

R/neighbourhood.R:323:22: style: Place a space before left parenthesis, except in a function call.

whBotTop <- ((adj$to - 1) %% numCell + 1) != adj$to
                     ^

R/neighbourhood.R:329:13: style: Place a space before left parenthesis, except in a function call.

if(returnDT)
            ^

R/neighbourhood.R:330:32: style: Commas should always have a space after.

return(unique(adj[,list(to)]))
                               ^

R/neighbourhood.R:338:22: style: Place a space before left parenthesis, except in a function call.

whBotTop <- ((adj$to - 1) %% numCell + 1) != adj$to
                     ^

R/neighbourhood.R:343:9: style: Place a space before left parenthesis, except in a function call.

if(returnDT)
        ^

R/neighbourhood.R:530:47: style: Do not place spaces around code in parentheses or square brackets.

if (!all(c("x", "y") %in% colnames(coords) )) {
                                              ^

R/neighbourhood.R:570:17: style: Place a space before left parenthesis, except in a function call.

if (any((minRadius != maxRadius))) {
                ^

R/neighbourhood.R:592:17: style: Place a space before left parenthesis, except in a function call.

if (any((minRadius != maxRadius))) {
                ^

R/neighbourhood.R:600:28: style: Place a space before left parenthesis, except in a function call.

numAngles <- ceiling((maxRadius / scaleRaster) * 2.6 * pi) + 1
                           ^

R/neighbourhood.R:613:41: style: Do not place spaces around code in parentheses or square brackets.

if (!c("id") %in% colnames(coords) ) {
                                        ^

R/neighbourhood.R:623:1: style: Lines should not be more than 100 characters.

# create vector of radius for the number of points that will be done for each individual circle
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

R/neighbourhood.R:636:1: style: Lines should not be more than 100 characters.

​            rep(unlist(lapply(numAngles[, 1], function(na) seq_len(na) * (pi * 2 / na))), ncol(numAngles))
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

R/neighbourhood.R:652:7: style: Variable or function name should be lowerCamelCase.

MAT <- data.table(id, indices, rads, angles, x = x, y = y)
      ^~~

R/neighbourhood.R:659:9: style: Variable or function name should be lowerCamelCase.

MAT <- unique(MAT)
        ^~~

R/neighbourhood.R:661:7: style: Variable or function name should be lowerCamelCase.

MAT <- na.omit(MAT)
      ^~~

R/neighbourhood.R:662:7: style: Variable or function name should be lowerCamelCase.

MAT <- as.matrix(MAT)
      ^~~

R/neighbourhood.R:665:7: style: Variable or function name should be lowerCamelCase.

MAT <- cbind(id, rads, angles, x, y, indices)
      ^~~

R/neighbourhood.R:668:9: style: Variable or function name should be lowerCamelCase.

MAT <- MAT[notDups, , drop = FALSE]
        ^~~

R/neighbourhood.R:670:7: style: Variable or function name should be lowerCamelCase.

MAT <- na.omit(MAT)
      ^~~

R/neighbourhood.R:684:9: style: Variable or function name should be lowerCamelCase.

MAT2 <- MAT
        ^~~~

R/neighbourhood.R:688:1: style: Lines should not be more than 100 characters.

MAT2 <- MAT[MAT[, "rads"] >= (maxRad - 0.71) | MAT[, "rads"] <= (minRad + 0.71), , drop = FALSE]
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

R/neighbourhood.R:688:11: style: Variable or function name should be lowerCamelCase.

MAT2 <- MAT[MAT[, "rads"] >= (maxRad - 0.71) | MAT[, "rads"] <= (minRad + 0.71), , drop = FALSE]
          ^~~~

R/neighbourhood.R:691:1: style: Lines should not be more than 100 characters.

MAT2 <- MAT[MAT[, "rads"] >= (MAT[, "maxRad"] - 0.71) | MAT[, "rads"] <= (MAT[, "minRad"] + 0.71), , drop = FALSE]
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

R/neighbourhood.R:691:11: style: Variable or function name should be lowerCamelCase.

MAT2 <- MAT[MAT[, "rads"] >= (MAT[, "maxRad"] - 0.71) | MAT[, "rads"] <= (MAT[, "minRad"] + 0.71), , drop = FALSE]
          ^~~~

R/neighbourhood.R:713:35: style: Commas should always have a space after.

d <- d[order(d[, "rads"]),, drop = FALSE]
                                  ^

R/neighbourhood.R:715:22: style: Commas should always have a space after.

d <- d[!dups,, drop = FALSE]
                     ^

R/neighbourhood.R:731:9: style: Variable or function name should be lowerCamelCase.

MAT <- MAT[, -which(colnames(MAT) == "angles"), drop = FALSE]
        ^~~

R/neighbourhood.R:733:12: style: Commas should always have a space after.

d[,"angles"] <- (pi / 2 - d[, "angles"]) %% (2 * pi)# convert to geographic
           ^

R/neighbourhood.R:734:14: style: Commas should always have a space after.

MAT[,"angles"] <- pi / 2 -  MAT[, "angles", drop = FALSE] %% (2 * pi)# convert to geographic
             ^

R/neighbourhood.R:739:29: style: Variable or function name should be lowerCamelCase.

if (length(wh) > 0) MAT <- d[, -wh, drop = FALSE]
                            ^~~

R/neighbourhood.R:742:29: style: Variable or function name should be lowerCamelCase.

if (length(wh) > 0) MAT <- d[, -wh, drop = FALSE]
                            ^~~

R/neighbourhood.R:745:1: style: Lines should not be more than 100 characters.

MATinterior <- MAT[MAT[, "rads"] < (maxRad - 0.71) & MAT[, "rads"] > (minRad + 0.71), , drop = FALSE]
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

R/neighbourhood.R:745:11: style: Variable or function name should be lowerCamelCase.

MATinterior <- MAT[MAT[, "rads"] < (maxRad - 0.71) & MAT[, "rads"] > (minRad + 0.71), , drop = FALSE]
          ^~~~~~~~~~~

R/neighbourhood.R:747:1: style: Lines should not be more than 100 characters.

MATinterior <- MAT[MAT[, "rads"] < (MAT[, "maxRad"] - 0.71) & MAT[, "rads"] > (MAT[, "minRad"] + 0.71), , drop = FALSE]
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

R/neighbourhood.R:747:11: style: Variable or function name should be lowerCamelCase.

MATinterior <- MAT[MAT[, "rads"] < (MAT[, "maxRad"] - 0.71) & MAT[, "rads"] > (MAT[, "minRad"] + 0.71), , drop = FALSE]
          ^~~~~~~~~~~

R/neighbourhood.R:749:9: style: Variable or function name should be lowerCamelCase.

MAT <- rbind(d[, colnames(MATinterior), drop = FALSE], MATinterior)
        ^~~

R/neighbourhood.R:750:9: style: Variable or function name should be lowerCamelCase.

MAT <- MAT[, -which(colnames(MAT) == "rads"), drop = FALSE]
        ^~~

R/neighbourhood.R:754:9: style: Variable or function name should be lowerCamelCase.

MAT <- MAT[, -which(colnames(MAT) == "angles"), drop = FALSE]
        ^~~

R/neighbourhood.R:756:7: style: Variable or function name should be lowerCamelCase.

MAT <- MAT[, -which(colnames(MAT) == "rads"), drop = FALSE]
      ^~~

R/neighbourhood.R:768:9: style: Variable or function name should be lowerCamelCase.

MAT <- data.table(MAT, key = "indices")
        ^~~

R/neighbourhood.R:770:11: style: Variable or function name should be lowerCamelCase.

MAT <- MAT[, sum(id), by = indices]
          ^~~

R/neighbourhood.R:772:11: style: Variable or function name should be lowerCamelCase.

MAT <- MAT[, sum(1 / dists), by = indices]
          ^~~

R/neighbourhood.R:841:29: style: Variable or function name should be lowerCamelCase.

setGeneric("wrap", function(X, bounds, withHeading) {
                            ^

R/neighbourhood.R:850:25: style: Variable or function name should be lowerCamelCase.

definition = function(X, bounds) {
                        ^

R/neighbourhood.R:867:25: style: Variable or function name should be lowerCamelCase.

definition = function(X, bounds) {
                        ^

R/neighbourhood.R:877:25: style: Variable or function name should be lowerCamelCase.

definition = function(X, bounds) {
                        ^

R/neighbourhood.R:878:5: style: Variable or function name should be lowerCamelCase.

X <- wrap(X, bounds = extent(bounds))
    ^

R/neighbourhood.R:887:25: style: Variable or function name should be lowerCamelCase.

definition = function(X, bounds) {
                        ^

R/neighbourhood.R:888:5: style: Variable or function name should be lowerCamelCase.

X <- wrap(X, bounds = extent(bounds))
    ^

R/neighbourhood.R:897:25: style: Variable or function name should be lowerCamelCase.

definition = function(X, bounds) {
                        ^

R/neighbourhood.R:900:7: style: Variable or function name should be lowerCamelCase.

X <- wrap(X, bounds = extent(bounds))
      ^

R/neighbourhood.R:912:25: style: Variable or function name should be lowerCamelCase.

definition = function(X, bounds, withHeading) {
                        ^

R/neighbourhood.R:937:25: style: Variable or function name should be lowerCamelCase.

definition = function(X, bounds, withHeading) {
                        ^

R/neighbourhood.R:938:7: style: Variable or function name should be lowerCamelCase.

X <- wrap(X, bounds = extent(bounds), withHeading = withHeading)
      ^

R/neighbourhood.R:947:25: style: Variable or function name should be lowerCamelCase.

definition = function(X, bounds, withHeading) {
                        ^

R/neighbourhood.R:948:9: style: Do not place spaces around code in parentheses or square brackets.

if ( identical(colnames(bounds), c("min", "max")) &
        ^

R/neighbourhood.R:950:7: style: Variable or function name should be lowerCamelCase.

X <- wrap(X, bounds = extent(bounds), withHeading = withHeading)
      ^

R/neighbourhood.R:1013:21: style: Commas should always have a space after.

angles <- seq(0,pi*2,length.out = 17)
                    ^

R/neighbourhood.R:1013:23: style: Put spaces around all infix operators.

angles <- seq(0,pi*2,length.out = 17)
                     ~^~

R/neighbourhood.R:1013:26: style: Commas should always have a space after.

angles <- seq(0,pi*2,length.out = 17)
                         ^

R/neighbourhood.R:1051:21: style: Commas should always have a space after.

​      do.call(rbind,d1)
                    ^

R/neighbourhood.R:1053:27: style: Commas should always have a space after.

d2xx <- do.call(rbind,dxx)
                          ^

R/numerical-comparisons.R:36:10: style: Place a space before left parenthesis, except in a function call.

return((x - a) * (b - x) >= 0) # NAs will propagate -- is this desired?
         ^

R/RcppExports.R:33:1: style: Lines should not be more than 100 characters.

#' \code{pointDistance2} - a matrix with all the \code{to} columns plus one extra \code{dists} column.
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

R/RcppExports.R:34:1: style: Lines should not be more than 100 characters.

#' \code{pointDistance3} - a matrix with x and y columns from \code{to} plus one extra \code{dists} column.
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

R/RcppExports.R:65:20: style: Variable or function name should be lowerCamelCase.

runifC <- function(N) {
                   ^

R/RcppExports.R:68:1: style: Trailing blank lines are superfluous.

^

R/rings.R:2:4: style: Commented code should be removed.

#  utils::globalVariables(c("indices", "id", "initialLocus", "dists", "dup", ".I"))
   ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Please sign in to comment.