Skip to content

Commit

Permalink
dev --> supposed to move to "first non RSGD"
Browse files Browse the repository at this point in the history
  • Loading branch information
eliotmcintire committed May 16, 2019
1 parent 3561d7f commit 434429e
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
6 changes: 3 additions & 3 deletions DESCRIPTION
Expand Up @@ -8,8 +8,8 @@ Description: A high-level plotting system, built using 'grid' graphics, that is
URL:
http://quickplot.predictiveecology.org,
https://github.com/PredictiveEcology/quickPlot
Version: 0.1.6
Date: 2018-11-06
Version: 0.1.6.9000
Date: 2019-05-15
Authors@R: c(
person("Eliot J B", "McIntire", email = "eliot.mcintire@canada.ca",
role = c("aut", "cre"), comment=c(ORCID = "https://orcid.org/0000-0002-6914-8316")),
Expand Down Expand Up @@ -53,7 +53,7 @@ License: GPL-3
VignetteBuilder: knitr, rmarkdown
BugReports: https://github.com/PredictiveEcology/quickPlot/issues
ByteCompile: yes
RoxygenNote: 6.1.0.9000
RoxygenNote: 6.1.1
Collate:
'environment.R'
'plotting-classes.R'
Expand Down
2 changes: 1 addition & 1 deletion NEWS.md
Expand Up @@ -2,7 +2,7 @@ Known issues: https://github.com/PredictiveEcology/quickPlot/issues

version 0.1.6
=============
* bugfixes
* bugfixes including `dev` on linux alikes

version 0.1.5
=============
Expand Down
4 changes: 2 additions & 2 deletions R/plotting-other.R
Expand Up @@ -431,11 +431,11 @@ dev <- function(x, ...) {
x <- 2L
} else {
if (any(names(dev.list()) == "RStudioGD")) {
x <- min(max(dev.list()) + 1,
x <- min(min(dev.list()) + 1,
which(names(dev.list()) == "RStudioGD") + 3L)
dev(x)
} else {
x <- max(dev.list())
x <- min(dev.list())
dev(x)
}
}
Expand Down

1 comment on commit 434429e

@lintr-bot
Copy link

Choose a reason for hiding this comment

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

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:287:35: style: Put spaces around all infix operators.

if (all(na.omit(grobToPlot[]%%1)==0))
                                 ~^~~

R/plotting-colours.R:287:39: style: Put spaces around all infix operators.

if (all(na.omit(grobToPlot[]%%1)==0))
                                     ~^~~

R/plotting-helpers.R:1028:44: style: Commas should always have a space after.

grobToPlot <- grobToPlot[polySeq,]
                                           ^

R/plotting-helpers.R:1033:38: style: Commas should always have a space after.

grobToPlot <- grobToPlot[a[1,],]
                                     ^

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

grobToPlot <- grobToPlot[a[1,],]
                                       ^

R/plotting-helpers.R:1296:41: style: Put spaces around all infix operators.

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

R/plotting-helpers.R:1296:45: style: Put spaces around all infix operators.

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

R/plotting-helpers.R:1385: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:2516: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:2594:1: style: Variable or function name should be lowerCamelCase.

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

R/plotting-helpers.R:2615:8: style: Commented code should be removed.

#xyOrd[["out"]] <- xyOrd[["out"]][thinRes, ]# thin line
       ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

R/plotting-helpers.R:2638:50: style: Commas should always have a space after.

dat <- x@data[as.numeric(names1) + 1,]
                                                 ^

R/plotting-helpers.R:2639:14: style: Commented code should be removed.

#row.names(dat) <- as.character(seq_len(length(xyOrd)))
             ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

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

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

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

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

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

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

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

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

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

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

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

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

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

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

R/plotting-helpers.R:2742: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:2745: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:2745:55: style: Commas should always have a space after.

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

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

​    which(polygon@data$Shape_Area>(sort(polygon@data$Shape_Area, decreasing = TRUE)[maxNumPolygons]))
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

R/plotting-helpers.R:2760:34: style: Put spaces around all infix operators.

​    which(polygon@data$Shape_Area>(sort(polygon@data$Shape_Area, decreasing = TRUE)[maxNumPolygons]))
                                ~^~

R/plotting-helpers.R:2760:35: style: Place a space before left parenthesis, except in a function call.

​    which(polygon@data$Shape_Area>(sort(polygon@data$Shape_Area, decreasing = TRUE)[maxNumPolygons]))
                                  ^

R/plotting-helpers.R:2783:26: style: Commas should always have a space after.

totalAvailable," polygons in this view. See options('quickPlot.maxNumPolygons')")
                         ^

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

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

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

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

R/plotting-other.R:251:30: style: Commas should always have a space after.

if (sum(corners$coords[1,] - corners$coords[2,]) %==% 0) {
                             ^

R/plotting-other.R:251:51: style: Commas should always have a space after.

if (sum(corners$coords[1,] - corners$coords[2,]) %==% 0) {
                                                  ^

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

if (length(row) == 0) { # above the plot
                          ^

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

if (length(column) == 0) { # above the plot
                             ^

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

​      message("setting graphics device away from Rstudio device. To return to Rstudio device: dev.useRSGD(TRUE)")
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

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

if (isTRUE("tools:rstudio" %in% search())) { # runing in Rstudio
                                             ^

R/plotting.R:290:1: style: Lines should not be more than 100 characters.

isDoCall <- grepl("^do.call", scalls) & grepl("\\<Plot\\>", scalls) & !grepl("test_that", scalls)
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

R/plotting.R:308:6: style: Commented code should be removed.

#whFrame <- grep(scalls, pattern = "^Plot|^quickPlot::Plot")
     ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

R/plotting.R:318:8: style: Commented code should be removed.

#dotObjs <- mget(dotNames[!noName], envir = plotFrame, inherits = TRUE)
       ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

R/plotting.R:322:1: style: Lines should not be more than 100 characters.

if (is.null(title)) plotArgs$title <- ifelse(nzchar(names(dotObjs2)), names(dotObjs2), dotNames)
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

tests/testthat/test-clickExtent.R:11:3: style: Variable or function name should be lowerCamelCase.

Sr1 <- Polygon(coords1)
  ^~~

tests/testthat/test-clickExtent.R:12:3: style: Variable or function name should be lowerCamelCase.

Srs1 <- Polygons(list(Sr1), "s1")
  ^~~~

tests/testthat/test-clickExtent.R:14:1: style: Lines should not be more than 100 characters.

​  crs(shpEcozone) <- "+init=epsg:4326 +proj=longlat +datum=WGS84 +no_defs +ellps=WGS84 +towgs84=0,0,0"
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

tests/testthat/test-clickExtent.R:24:1: style: Lines should not be more than 100 characters.

bb <- raster::shapefile(file.path(cacheRepo, "EC_borealdisturbance_polygonal_2008_2010_FINAL_ALBERS.shp"))
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

tests/testthat/test-examples.R:11:15: style: Closing curly-braces should always be on their own line, unless it's followed by an else.

​    setwd(owd)}
              ^

tests/testthat/test-Plot-do-call.R:8:3: style: Variable or function name should be lowerCamelCase.

Sr1 <- Polygon(coords1)
  ^~~

tests/testthat/test-Plot-do-call.R:9:3: style: Variable or function name should be lowerCamelCase.

Srs1 <- Polygons(list(Sr1), "s1")
  ^~~~

tests/testthat/test-Plot-do-call.R:11:1: style: Lines should not be more than 100 characters.

​  crs(shpEcozone) <- "+init=epsg:4326 +proj=longlat +datum=WGS84 +no_defs +ellps=WGS84 +towgs84=0,0,0"
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

tests/testthat/test-Plot-do-call.R:13:24: style: Commas should always have a space after.

r <- raster(extent(0,10,0,10), res = 1, vals = 1:100)
                       ^

tests/testthat/test-Plot-do-call.R:13:27: style: Commas should always have a space after.

r <- raster(extent(0,10,0,10), res = 1, vals = 1:100)
                          ^

tests/testthat/test-Plot-do-call.R:13:29: style: Commas should always have a space after.

r <- raster(extent(0,10,0,10), res = 1, vals = 1:100)
                            ^

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
  ^

Please sign in to comment.