New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

thin fixes -- bugfixes, SpatialPolygonsDataFrames #13

Merged
merged 4 commits into from Mar 26, 2018

Conversation

Projects
None yet
3 participants
@eliotmcintire
Contributor

eliotmcintire commented Mar 26, 2018

No description provided.

@lintr-bot

This comment has been minimized.

lintr-bot commented Mar 26, 2018

R/plotting-colours.R:89:1: style: Lines should not be more than 100 characters.

if (all(na.omit(object[])%%1==0)) { # some factor rasters are actually real number -- makes no sense
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

R/plotting-colours.R:89:32: style: Put spaces around all infix operators.

if (all(na.omit(object[])%%1==0)) { # some factor rasters are actually real number -- makes no sense
                              ~^~~

R/plotting-colours.R:89:35: style: Put spaces around all infix operators.

if (all(na.omit(object[])%%1==0)) { # some factor rasters are actually real number -- makes no sense
                                 ~^~~

R/plotting-colours.R:89:41: style: Opening curly braces should never go on their own line and should always be followed by a new line.

if (all(na.omit(object[])%%1==0)) { # some factor rasters are actually real number -- makes no sense
                                        ^

R/plotting-colours.R:106:1: style: Lines should not be more than 100 characters.

if (all(na.omit(object[])%%1==0)) { # some factor rasters are actually real number -- makes no sense
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

R/plotting-colours.R:106:32: style: Put spaces around all infix operators.

if (all(na.omit(object[])%%1==0)) { # some factor rasters are actually real number -- makes no sense
                              ~^~~

R/plotting-colours.R:106:35: style: Put spaces around all infix operators.

if (all(na.omit(object[])%%1==0)) { # some factor rasters are actually real number -- makes no sense
                                 ~^~~

R/plotting-colours.R:106:41: style: Opening curly braces should never go on their own line and should always be followed by a new line.

if (all(na.omit(object[])%%1==0)) { # some factor rasters are actually real number -- makes no sense
                                        ^

R/plotting-colours.R:131:1: style: Lines should not be more than 100 characters.

if (all(na.omit(object[])%%1==0)) { # some factor rasters are actually real number -- makes no sense
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

R/plotting-colours.R:131:32: style: Put spaces around all infix operators.

if (all(na.omit(object[])%%1==0)) { # some factor rasters are actually real number -- makes no sense
                              ~^~~

R/plotting-colours.R:131:35: style: Put spaces around all infix operators.

if (all(na.omit(object[])%%1==0)) { # some factor rasters are actually real number -- makes no sense
                                 ~^~~

R/plotting-colours.R:131:41: style: Opening curly braces should never go on their own line and should always be followed by a new line.

if (all(na.omit(object[])%%1==0)) { # some factor rasters are actually real number -- makes no sense
                                        ^

R/plotting-colours.R:283:67: style: Put spaces around all infix operators.

isFac <- any(raster::is.factor(grobToPlot)) & all(grobToPlot[]%%1==0)
                                                                 ~^~~

R/plotting-colours.R:283:70: style: Put spaces around all infix operators.

isFac <- any(raster::is.factor(grobToPlot)) & all(grobToPlot[]%%1==0)
                                                                    ~^~~

R/plotting-helpers.R:1269:33: style: Put spaces around all infix operators.

if (all(grobToPlot[]%%1==0)) {
                               ~^~~

R/plotting-helpers.R:1269:36: style: Put spaces around all infix operators.

if (all(grobToPlot[]%%1==0)) {
                                  ~^~~

R/plotting-helpers.R:1358:1: style: Lines should not be more than 100 characters.

​    grid.rect(x = 0, height = unit(1 + needsNewTitle * inherits(grobToPlot, "Raster") * 0.20 / (nRows / 2), "npc"),
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

R/plotting-helpers.R:2503:1: style: Lines should not be more than 100 characters.

#'          jitter(sort(rbeta(nPoints, betaPar, betaPar) * (maxY - minY) + minY, decreasing = TRUE)),
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

R/plotting-helpers.R:2578:1: style: Lines should not be more than 100 characters.

thin.SpatialPolygons <- function(x, tolerance = NULL, returnDataFrame = FALSE, minCoordsToThin = 0) {
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

R/plotting-helpers.R:2578:1: style: Variable or function name should be lowerCamelCase.

thin.SpatialPolygons <- function(x, tolerance = NULL, returnDataFrame = FALSE, minCoordsToThin = 0) {
^~~~~~~~~~~~~~~~~~~~

R/plotting-helpers.R:2594:48: style: Commas should always have a space after.

xyOrd[["idLength"]] <- xyOrd[["out"]][,list(V1=.N),by=groups]
                                               ^

R/plotting-helpers.R:2594:55: style: Put spaces around all infix operators.

xyOrd[["idLength"]] <- xyOrd[["out"]][,list(V1=.N),by=groups]
                                                     ~^~

R/plotting-helpers.R:2594:60: style: Commas should always have a space after.

xyOrd[["idLength"]] <- xyOrd[["out"]][,list(V1=.N),by=groups]
                                                           ^

R/plotting-helpers.R:2594:62: style: Put spaces around all infix operators.

xyOrd[["idLength"]] <- xyOrd[["out"]][,list(V1=.N),by=groups]
                                                            ~^~

R/plotting-helpers.R:2643:1: style: Variable or function name should be lowerCamelCase.

thin.default <- function(x, tolerance, returnDataFrame, minCoordsToThin) {
^~~~~~~~~~~~

R/plotting-helpers.R:2668:3: style: Variable or function name should be lowerCamelCase.

IDs <- tryCatch(unlist(lapply(ord, function(xx) {
  ^~~

R/plotting-helpers.R:2696:7: style: Commented code should be removed.

# Polygons <- rep(rep(seq(numPolygons), numPolygon), idLength$V1) # sequential numbering
      ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

R/plotting-helpers.R:2697:5: style: Variable or function name should be lowerCamelCase.

Polygons <- rep(rep(IDs, numPolygon), idLength$V1) # actual ID labelling
    ^~~~~~~~

R/plotting-helpers.R:2698:5: style: Variable or function name should be lowerCamelCase.

Polygon <- rep(unlist(lapply(numPolygon, seq)), idLength$V1)
    ^~~~~~~

R/plotting-helpers.R:2705:36: style: Commas should always have a space after.

return(data.frame(lat = xyOrd[,1], long = xyOrd[,2], order = orders,
                                   ^

R/plotting-helpers.R:2705:54: style: Commas should always have a space after.

return(data.frame(lat = xyOrd[,1], long = xyOrd[,2], order = orders,
                                                     ^

R/plotting-helpers.R:2707:1: style: Lines should not be more than 100 characters.

#group = paste0(as.character(Polygons), ".", as.character(Polygon)))) # the actual fortify
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

R/plotting-helpers.R:2710:40: style: Commas should always have a space after.

out <- setDT(data.frame(x = xyOrd[,1], y = xyOrd[,2], groups = groups))
                                       ^

R/plotting-helpers.R:2710:55: style: Commas should always have a space after.

out <- setDT(data.frame(x = xyOrd[,1], y = xyOrd[,2], groups = groups))
                                                      ^

R/plotting-other.R:199:48: style: Put spaces around all infix operators.

if (any(raster::is.factor(ras1)) & all(ras1[]%%1==0)) {
                                              ~^~~

R/plotting-other.R:199:51: style: Put spaces around all infix operators.

if (any(raster::is.factor(ras1)) & all(ras1[]%%1==0)) {
                                                 ~^~~

tests/testthat/test-examples.R:9:48: style: Opening curly braces should never go on their own line and should always be followed by a new line.

if (grepl("VIC-", Sys.info()["nodename"])) { # for debugging only
                                               ^

tests/testthat/test-examples.R:12:6: style: Commented code should be removed.

#browser()
     ^~~~~~~~~

tests/testthat/test-examples.R:13:29: style: Put spaces around all infix operators.

​    expect_true(length(warn)==0)
                           ~^~~

tests/testthat/test-Plot-nonVisual.R:65:21: style: Commented code should be removed.

​  library(raster); #on.exit(detach("package:raster"), add = TRUE)
                    ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

tests/testthat/test-Plot-nonVisual.R:70:3: style: Variable or function name should be lowerCamelCase.

N <- ncol * nrow
  ^
@coveralls

This comment has been minimized.

coveralls commented Mar 26, 2018

Coverage Status

Coverage increased (+0.05%) to 71.313% when pulling ef2b30f on thinFixes into 565b688 on development.

@eliotmcintire eliotmcintire merged commit 4b647f7 into development Mar 26, 2018

3 checks passed

continuous-integration/appveyor/pr AppVeyor build succeeded
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details
coverage/coveralls Coverage increased (+0.05%) to 71.313%
Details

@eliotmcintire eliotmcintire deleted the thinFixes branch Mar 27, 2018

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment