[R/boxplots.R:2:1:](https://github.com/PredictiveEcology/LandWebUtils/blob/bae5f9cbc04b28048ecf2268ba607fa6e40530a0/R/boxplots.R#L2) *style:* **Lines should not be more than 80 characters.**
```r
  utils::globalVariables(c(".", ":=", ".SD", "ageClass", "group", "proportionCC",
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
```
[R/boxplots.R:11:1:](https://github.com/PredictiveEcology/LandWebUtils/blob/bae5f9cbc04b28048ecf2268ba607fa6e40530a0/R/boxplots.R#L11) *style:* **Variable or function name should be snake_case.**
```r
.doPlotBoxplot <- function(data, authStatus, fname = NULL, ageClasses,
^~~~~~~~~~~~~~
```
[R/boxplots.R:11:34:](https://github.com/PredictiveEcology/LandWebUtils/blob/bae5f9cbc04b28048ecf2268ba607fa6e40530a0/R/boxplots.R#L11) *style:* **Variable or function name should be snake_case.**
```r
.doPlotBoxplot <- function(data, authStatus, fname = NULL, ageClasses,
                                 ^~~~~~~~~~
```
[R/boxplots.R:11:60:](https://github.com/PredictiveEcology/LandWebUtils/blob/bae5f9cbc04b28048ecf2268ba607fa6e40530a0/R/boxplots.R#L11) *style:* **Variable or function name should be snake_case.**
```r
.doPlotBoxplot <- function(data, authStatus, fname = NULL, ageClasses,
                                                           ^~~~~~~~~~
```
[R/boxplots.R:12:41:](https://github.com/PredictiveEcology/LandWebUtils/blob/bae5f9cbc04b28048ecf2268ba607fa6e40530a0/R/boxplots.R#L12) *style:* **Variable or function name should be snake_case.**
```r
                           fout = NULL, vegCover, zone, ...) {
                                        ^~~~~~~~
```
[R/boxplots.R:16:3:](https://github.com/PredictiveEcology/LandWebUtils/blob/bae5f9cbc04b28048ecf2268ba607fa6e40530a0/R/boxplots.R#L16) *style:* **Variable or function name should be snake_case.**
```r
  boxplotData <- data.table(zone = rep(zone, 4),
  ^~~~~~~~~~~
```
[R/boxplots.R:32:1:](https://github.com/PredictiveEcology/LandWebUtils/blob/bae5f9cbc04b28048ecf2268ba607fa6e40530a0/R/boxplots.R#L32) *style:* **Lines should not be more than 80 characters.**
```r
    points(data$proportionCC[ids], factor(data$ageClass[1:4]), col = "red", pch = 20, cex = 3)
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
```
[R/boxplots.R:55:1:](https://github.com/PredictiveEcology/LandWebUtils/blob/bae5f9cbc04b28048ecf2268ba607fa6e40530a0/R/boxplots.R#L55) *style:* **Variable or function name should be snake_case.**
```r
runBoxPlotsVegCover <- function(map, functionName, analysisGroups, dPath) {
^~~~~~~~~~~~~~~~~~~
```
[R/boxplots.R:55:38:](https://github.com/PredictiveEcology/LandWebUtils/blob/bae5f9cbc04b28048ecf2268ba607fa6e40530a0/R/boxplots.R#L55) *style:* **Variable or function name should be snake_case.**
```r
runBoxPlotsVegCover <- function(map, functionName, analysisGroups, dPath) {
                                     ^~~~~~~~~~~~
```
[R/boxplots.R:55:52:](https://github.com/PredictiveEcology/LandWebUtils/blob/bae5f9cbc04b28048ecf2268ba607fa6e40530a0/R/boxplots.R#L55) *style:* **Variable or function name should be snake_case.**
```r
runBoxPlotsVegCover <- function(map, functionName, analysisGroups, dPath) {
                                                   ^~~~~~~~~~~~~~
```
[R/boxplots.R:55:68:](https://github.com/PredictiveEcology/LandWebUtils/blob/bae5f9cbc04b28048ecf2268ba607fa6e40530a0/R/boxplots.R#L55) *style:* **Variable or function name should be snake_case.**
```r
runBoxPlotsVegCover <- function(map, functionName, analysisGroups, dPath) {
                                                                   ^~~~~
```
[R/boxplots.R:56:4:](https://github.com/PredictiveEcology/LandWebUtils/blob/bae5f9cbc04b28048ecf2268ba607fa6e40530a0/R/boxplots.R#L56) *style:* **Commented code should be removed.**
```r
  #ageClasses = c("Young", "Immature", "Mature", "Old")
   ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
```
[R/boxplots.R:57:3:](https://github.com/PredictiveEcology/LandWebUtils/blob/bae5f9cbc04b28048ecf2268ba607fa6e40530a0/R/boxplots.R#L57) *style:* **Variable or function name should be snake_case.**
```r
  ageClasses <- c("Young", "Immature", "Mature", "Old")
  ^~~~~~~~~~
```
[R/boxplots.R:58:3:](https://github.com/PredictiveEcology/LandWebUtils/blob/bae5f9cbc04b28048ecf2268ba607fa6e40530a0/R/boxplots.R#L58) *style:* **Variable or function name should be snake_case.**
```r
  allRepPolys <- na.omit(map@metadata[[analysisGroups]])
  ^~~~~~~~~~~
```
[R/boxplots.R:62:1:](https://github.com/PredictiveEcology/LandWebUtils/blob/bae5f9cbc04b28048ecf2268ba607fa6e40530a0/R/boxplots.R#L62) *style:* **Lines should not be more than 80 characters.**
```r
    allData <- map@analysesData[[functionName]][["LeadingVegTypeByAgeClass"]][[poly]]
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
```
[R/boxplots.R:62:5:](https://github.com/PredictiveEcology/LandWebUtils/blob/bae5f9cbc04b28048ecf2268ba607fa6e40530a0/R/boxplots.R#L62) *style:* **Variable or function name should be snake_case.**
```r
    allData <- map@analysesData[[functionName]][["LeadingVegTypeByAgeClass"]][[poly]]
    ^~~~~~~
```
[R/boxplots.R:64:7:](https://github.com/PredictiveEcology/LandWebUtils/blob/bae5f9cbc04b28048ecf2268ba607fa6e40530a0/R/boxplots.R#L64) *style:* **Variable or function name should be snake_case.**
```r
      allData <- map@analysesData[[functionName]][[poly]] ## TODO: fix upstream
      ^~~~~~~
```
[R/boxplots.R:65:5:](https://github.com/PredictiveEcology/LandWebUtils/blob/bae5f9cbc04b28048ecf2268ba607fa6e40530a0/R/boxplots.R#L65) *style:* **Variable or function name should be snake_case.**
```r
    allData <- unique(allData) ## remove duplicates; with LandWeb#89
    ^~~~~~~
```
[R/boxplots.R:66:13:](https://github.com/PredictiveEcology/LandWebUtils/blob/bae5f9cbc04b28048ecf2268ba607fa6e40530a0/R/boxplots.R#L66) *style:* **Variable or function name should be snake_case.**
```r
    allData$vegCover <- gsub(" leading", "", allData$vegCover) %>%
            ^~~~~~~~
```
[R/boxplots.R:69:13:](https://github.com/PredictiveEcology/LandWebUtils/blob/bae5f9cbc04b28048ecf2268ba607fa6e40530a0/R/boxplots.R#L69) *style:* **Variable or function name should be snake_case.**
```r
    allData$ageClass <- factor(allData$ageClass, ageClasses)
            ^~~~~~~~
```
[R/boxplots.R:71:34:](https://github.com/PredictiveEcology/LandWebUtils/blob/bae5f9cbc04b28048ecf2268ba607fa6e40530a0/R/boxplots.R#L71) *warning:* **no visible binding for global variable ‘group’, Did you mean 'drop'?**
```r
    data <- allData[!grepl("CC", group)]
                                 ^~~~~
```
[R/boxplots.R:73:5:](https://github.com/PredictiveEcology/LandWebUtils/blob/bae5f9cbc04b28048ecf2268ba607fa6e40530a0/R/boxplots.R#L73) *style:* **Variable or function name should be snake_case.**
```r
    dataCC <- allData[grepl("CC", group)]
    ^~~~~~
```
[R/boxplots.R:73:35:](https://github.com/PredictiveEcology/LandWebUtils/blob/bae5f9cbc04b28048ecf2268ba607fa6e40530a0/R/boxplots.R#L73) *warning:* **no visible binding for global variable ‘group’, Did you mean 'drop'?**
```r
    dataCC <- allData[grepl("CC", group)]
                                  ^~~~~
```
[R/boxplots.R:74:1:](https://github.com/PredictiveEcology/LandWebUtils/blob/bae5f9cbc04b28048ecf2268ba607fa6e40530a0/R/boxplots.R#L74) *style:* **Lines should not be more than 80 characters.**
```r
    setnames(dataCC, "proportion", "proportionCC") ## rename the column to proportionCC
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
```
[R/boxplots.R:74:5:](https://github.com/PredictiveEcology/LandWebUtils/blob/bae5f9cbc04b28048ecf2268ba607fa6e40530a0/R/boxplots.R#L74) *warning:* **no visible global function definition for ‘setnames’, Did you mean 'setNames'?**
```r
    setnames(dataCC, "proportion", "proportionCC") ## rename the column to proportionCC
    ^~~~~~~~
```
[R/boxplots.R:75:5:](https://github.com/PredictiveEcology/LandWebUtils/blob/bae5f9cbc04b28048ecf2268ba607fa6e40530a0/R/boxplots.R#L75) *style:* **Variable or function name should be snake_case.**
```r
    dataCC <- dataCC[, c("group", "label", "NPixels") := list(NULL, NULL, NULL)]
    ^~~~~~
```
[R/boxplots.R:75:55:](https://github.com/PredictiveEcology/LandWebUtils/blob/bae5f9cbc04b28048ecf2268ba607fa6e40530a0/R/boxplots.R#L75) *warning:* **no visible global function definition for ‘:=’, Did you mean ':'?**
```r
    dataCC <- dataCC[, c("group", "label", "NPixels") := list(NULL, NULL, NULL)]
                                                      ^~
```
[R/boxplots.R:77:32:](https://github.com/PredictiveEcology/LandWebUtils/blob/bae5f9cbc04b28048ecf2268ba607fa6e40530a0/R/boxplots.R#L77) *warning:* **no visible global function definition for ‘.’, Did you mean 'C'?**
```r
    data2 <- dataCC[data, on = .(zone, vegCover, ageClass)]
                               ^
```
[R/boxplots.R:77:34:](https://github.com/PredictiveEcology/LandWebUtils/blob/bae5f9cbc04b28048ecf2268ba607fa6e40530a0/R/boxplots.R#L77) *warning:* **no visible binding for global variable ‘zone’, Did you mean 'line'?**
```r
    data2 <- dataCC[data, on = .(zone, vegCover, ageClass)]
                                 ^~~~
```
[R/boxplots.R:77:40:](https://github.com/PredictiveEcology/LandWebUtils/blob/bae5f9cbc04b28048ecf2268ba607fa6e40530a0/R/boxplots.R#L77) *warning:* **no visible binding for global variable ‘vegCover’**
```r
    data2 <- dataCC[data, on = .(zone, vegCover, ageClass)]
                                       ^~~~~~~~
```
[R/boxplots.R:77:50:](https://github.com/PredictiveEcology/LandWebUtils/blob/bae5f9cbc04b28048ecf2268ba607fa6e40530a0/R/boxplots.R#L77) *warning:* **no visible binding for global variable ‘ageClass’, Did you mean 'ageClasses'?**
```r
    data2 <- dataCC[data, on = .(zone, vegCover, ageClass)]
                                                 ^~~~~~~~
```
[R/boxplots.R:78:17:](https://github.com/PredictiveEcology/LandWebUtils/blob/bae5f9cbc04b28048ecf2268ba607fa6e40530a0/R/boxplots.R#L78) *warning:* **no visible binding for global variable ‘NPixels’**
```r
    data2[is.na(NPixels), NPixels := 0]
                ^~~~~~~
```
[R/boxplots.R:78:17:](https://github.com/PredictiveEcology/LandWebUtils/blob/bae5f9cbc04b28048ecf2268ba607fa6e40530a0/R/boxplots.R#L78) *warning:* **no visible binding for global variable ‘NPixels’**
```r
    data2[is.na(NPixels), NPixels := 0]
                ^~~~~~~
```
[R/boxplots.R:78:27:](https://github.com/PredictiveEcology/LandWebUtils/blob/bae5f9cbc04b28048ecf2268ba607fa6e40530a0/R/boxplots.R#L78) *style:* **Variable or function name should be snake_case.**
```r
    data2[is.na(NPixels), NPixels := 0]
                          ^~~~~~~
```
[R/boxplots.R:78:35:](https://github.com/PredictiveEcology/LandWebUtils/blob/bae5f9cbc04b28048ecf2268ba607fa6e40530a0/R/boxplots.R#L78) *warning:* **no visible global function definition for ‘:=’, Did you mean ':'?**
```r
    data2[is.na(NPixels), NPixels := 0]
                                  ^~
```
[R/boxplots.R:81:1:](https://github.com/PredictiveEcology/LandWebUtils/blob/bae5f9cbc04b28048ecf2268ba607fa6e40530a0/R/boxplots.R#L81) *style:* **Lines should not be more than 80 characters.**
```r
    ## NOTE: this is number of TREED pixels, which is likely smaller than the polygon area
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
```
[R/boxplots.R:82:13:](https://github.com/PredictiveEcology/LandWebUtils/blob/bae5f9cbc04b28048ecf2268ba607fa6e40530a0/R/boxplots.R#L82) *style:* **Variable or function name should be snake_case.**
```r
    data2[, totalPixels := as.double(base::sum(NPixels, na.rm = TRUE)),
            ^~~~~~~~~~~
```
[R/boxplots.R:84:13:](https://github.com/PredictiveEcology/LandWebUtils/blob/bae5f9cbc04b28048ecf2268ba607fa6e40530a0/R/boxplots.R#L84) *style:* **Variable or function name should be snake_case.**
```r
    data2[, totalPixels2 := as.double(base::mean(totalPixels, na.rm = TRUE)),
            ^~~~~~~~~~~~
```
[R/boxplots.R:86:1:](https://github.com/PredictiveEcology/LandWebUtils/blob/bae5f9cbc04b28048ecf2268ba607fa6e40530a0/R/boxplots.R#L86) *style:* **Lines should not be more than 80 characters.**
```r
    try(write.csv(data2, file.path(dPath, paste0("leading_", gsub(" ", "_", poly), ".csv"))))
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
```
[R/boxplots.R:93:1:](https://github.com/PredictiveEcology/LandWebUtils/blob/bae5f9cbc04b28048ecf2268ba607fa6e40530a0/R/boxplots.R#L93) *style:* **Lines should not be more than 80 characters.**
```r
    fout <- file.path(dPath, paste0("leading_boxplots_", gsub(" ", "_", poly), ".csv"))
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
```
[R/boxplots.R:96:5:](https://github.com/PredictiveEcology/LandWebUtils/blob/bae5f9cbc04b28048ecf2268ba607fa6e40530a0/R/boxplots.R#L96) *style:* **Variable or function name should be snake_case.**
```r
    saveDir <- checkPath(file.path(dPath, poly), create = TRUE)
    ^~~~~~~
```
[R/boxplots.R:96:5:](https://github.com/PredictiveEcology/LandWebUtils/blob/bae5f9cbc04b28048ecf2268ba607fa6e40530a0/R/boxplots.R#L96) *warning:* **local variable ‘saveDir’ assigned but may not be used**
```r
    saveDir <- checkPath(file.path(dPath, poly), create = TRUE)
    ^~~~~~~
```
[R/boxplots.R:96:16:](https://github.com/PredictiveEcology/LandWebUtils/blob/bae5f9cbc04b28048ecf2268ba607fa6e40530a0/R/boxplots.R#L96) *warning:* **no visible global function definition for ‘checkPath’**
```r
    saveDir <- checkPath(file.path(dPath, poly), create = TRUE)
               ^~~~~~~~~
```
[R/boxplots.R:97:1:](https://github.com/PredictiveEcology/LandWebUtils/blob/bae5f9cbc04b28048ecf2268ba607fa6e40530a0/R/boxplots.R#L97) *style:* **Lines should not be more than 80 characters.**
```r
    savePng <- quote(file.path(saveDir, paste0(unique(paste(zone, vegCover, collapse = " ")), ".png")))
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
```
[R/boxplots.R:97:5:](https://github.com/PredictiveEcology/LandWebUtils/blob/bae5f9cbc04b28048ecf2268ba607fa6e40530a0/R/boxplots.R#L97) *style:* **Variable or function name should be snake_case.**
```r
    savePng <- quote(file.path(saveDir, paste0(unique(paste(zone, vegCover, collapse = " ")), ".png")))
    ^~~~~~~
```
[R/boxplots.R:108:1:](https://github.com/PredictiveEcology/LandWebUtils/blob/bae5f9cbc04b28048ecf2268ba607fa6e40530a0/R/boxplots.R#L108) *style:* **Lines should not be more than 80 characters.**
```r
                                    main = unique(paste(zone, vegCover, collapse = "_")),
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
```
[R/boxplots.R:109:1:](https://github.com/PredictiveEcology/LandWebUtils/blob/bae5f9cbc04b28048ecf2268ba607fa6e40530a0/R/boxplots.R#L109) *style:* **Lines should not be more than 80 characters.**
```r
                                    xlab = paste0("Proportion of forest area (total ",
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
```
[R/boxplots.R:111:1:](https://github.com/PredictiveEcology/LandWebUtils/blob/bae5f9cbc04b28048ecf2268ba607fa6e40530a0/R/boxplots.R#L111) *style:* **Lines should not be more than 80 characters.**
```r
                                                           prod(res(rasterToMatch(map))) / 1e4,
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
```
[R/boxplots.R:117:1:](https://github.com/PredictiveEcology/LandWebUtils/blob/bae5f9cbc04b28048ecf2268ba607fa6e40530a0/R/boxplots.R#L117) *style:* **Lines should not be more than 80 characters.**
```r
          .SDcols = c("ageClass", "proportion", "proportionCC", "NPixels"), by = slices]
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
```
[R/histograms.R:8:1:](https://github.com/PredictiveEcology/LandWebUtils/blob/bae5f9cbc04b28048ecf2268ba607fa6e40530a0/R/histograms.R#L8) *style:* **Variable or function name should be snake_case.**
```r
.doPlotHistogram <- function(data, xlim, fname = NULL, ...) {
^~~~~~~~~~~~~~~~
```
[R/histograms.R:9:3:](https://github.com/PredictiveEcology/LandWebUtils/blob/bae5f9cbc04b28048ecf2268ba607fa6e40530a0/R/histograms.R#L9) *style:* **Variable or function name should be snake_case.**
```r
  minNumBars <- 6
  ^~~~~~~~~~
```
[R/histograms.R:10:3:](https://github.com/PredictiveEcology/LandWebUtils/blob/bae5f9cbc04b28048ecf2268ba607fa6e40530a0/R/histograms.R#L10) *style:* **Variable or function name should be snake_case.**
```r
  maxNumBars <- 30
  ^~~~~~~~~~
```
[R/histograms.R:11:3:](https://github.com/PredictiveEcology/LandWebUtils/blob/bae5f9cbc04b28048ecf2268ba607fa6e40530a0/R/histograms.R#L11) *style:* **Variable or function name should be snake_case.**
```r
  rangeNClusters <- range(c(0, xlim, minNumBars)) ## TODO: verify
  ^~~~~~~~~~~~~~
```
[R/histograms.R:12:3:](https://github.com/PredictiveEcology/LandWebUtils/blob/bae5f9cbc04b28048ecf2268ba607fa6e40530a0/R/histograms.R#L12) *style:* **Variable or function name should be snake_case.**
```r
  attemptedNumBars <- max(minNumBars, min(maxNumBars, diff(rangeNClusters)))
  ^~~~~~~~~~~~~~~~
```
[R/histograms.R:14:1:](https://github.com/PredictiveEcology/LandWebUtils/blob/bae5f9cbc04b28048ecf2268ba607fa6e40530a0/R/histograms.R#L14) *style:* **Lines should not be more than 80 characters.**
```r
  breaksRaw <- seq(rangeNClusters[1], rangeNClusters[2], length.out = attemptedNumBars)
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
```
[R/histograms.R:14:3:](https://github.com/PredictiveEcology/LandWebUtils/blob/bae5f9cbc04b28048ecf2268ba607fa6e40530a0/R/histograms.R#L14) *style:* **Variable or function name should be snake_case.**
```r
  breaksRaw <- seq(rangeNClusters[1], rangeNClusters[2], length.out = attemptedNumBars)
  ^~~~~~~~~
```
[R/histograms.R:15:1:](https://github.com/PredictiveEcology/LandWebUtils/blob/bae5f9cbc04b28048ecf2268ba607fa6e40530a0/R/histograms.R#L15) *style:* **Lines should not be more than 80 characters.**
```r
  prettyBreaks <- pretty(breaksRaw, n = attemptedNumBars, min.n = min(attemptedNumBars, minNumBars))
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
```
[R/histograms.R:15:3:](https://github.com/PredictiveEcology/LandWebUtils/blob/bae5f9cbc04b28048ecf2268ba607fa6e40530a0/R/histograms.R#L15) *style:* **Variable or function name should be snake_case.**
```r
  prettyBreaks <- pretty(breaksRaw, n = attemptedNumBars, min.n = min(attemptedNumBars, minNumBars))
  ^~~~~~~~~~~~
```
[R/histograms.R:17:3:](https://github.com/PredictiveEcology/LandWebUtils/blob/bae5f9cbc04b28048ecf2268ba607fa6e40530a0/R/histograms.R#L17) *style:* **Variable or function name should be snake_case.**
```r
  dataForBreaks <- dataForHistogram <- if (NROW(data) == 0) {
  ^~~~~~~~~~~~~
```
[R/histograms.R:17:20:](https://github.com/PredictiveEcology/LandWebUtils/blob/bae5f9cbc04b28048ecf2268ba607fa6e40530a0/R/histograms.R#L17) *style:* **Variable or function name should be snake_case.**
```r
  dataForBreaks <- dataForHistogram <- if (NROW(data) == 0) {
                   ^~~~~~~~~~~~~~~~
```
[R/histograms.R:24:3:](https://github.com/PredictiveEcology/LandWebUtils/blob/bae5f9cbc04b28048ecf2268ba607fa6e40530a0/R/histograms.R#L24) *style:* **Variable or function name should be snake_case.**
```r
  breaksLabels <- dataForBreaks$breaks
  ^~~~~~~~~~~~
```
[R/histograms.R:25:3:](https://github.com/PredictiveEcology/LandWebUtils/blob/bae5f9cbc04b28048ecf2268ba607fa6e40530a0/R/histograms.R#L25) *style:* **Variable or function name should be snake_case.**
```r
  breaksInterval <- diff(breaksLabels)[1]
  ^~~~~~~~~~~~~~
```
[R/histograms.R:27:1:](https://github.com/PredictiveEcology/LandWebUtils/blob/bae5f9cbc04b28048ecf2268ba607fa6e40530a0/R/histograms.R#L27) *style:* **Lines should not be more than 80 characters.**
```r
  histogramData <- dataForHistogram$counts / sum(dataForHistogram$counts) ## use proportion
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
```
[R/histograms.R:27:3:](https://github.com/PredictiveEcology/LandWebUtils/blob/bae5f9cbc04b28048ecf2268ba607fa6e40530a0/R/histograms.R#L27) *style:* **Variable or function name should be snake_case.**
```r
  histogramData <- dataForHistogram$counts / sum(dataForHistogram$counts) ## use proportion
  ^~~~~~~~~~~~~
```
[R/histograms.R:28:1:](https://github.com/PredictiveEcology/LandWebUtils/blob/bae5f9cbc04b28048ecf2268ba607fa6e40530a0/R/histograms.R#L28) *style:* **Lines should not be more than 80 characters.**
```r
  histogramData[is.na(histogramData)] <- 0 # NA means that there were no large patches in dt
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
```
[R/histograms.R:30:3:](https://github.com/PredictiveEcology/LandWebUtils/blob/bae5f9cbc04b28048ecf2268ba607fa6e40530a0/R/histograms.R#L30) *style:* **Variable or function name should be snake_case.**
```r
  barplotBreaks <- seq_along(breaksLabels) - 0.5
  ^~~~~~~~~~~~~
```
[R/histograms.R:31:1:](https://github.com/PredictiveEcology/LandWebUtils/blob/bae5f9cbc04b28048ecf2268ba607fa6e40530a0/R/histograms.R#L31) *style:* **Lines should not be more than 80 characters.**
```r
  addAxisParams <- list(side = 1, labels = breaksLabels, at = barplotBreaks - min(breaksLabels))
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
```
[R/histograms.R:31:3:](https://github.com/PredictiveEcology/LandWebUtils/blob/bae5f9cbc04b28048ecf2268ba607fa6e40530a0/R/histograms.R#L31) *style:* **Variable or function name should be snake_case.**
```r
  addAxisParams <- list(side = 1, labels = breaksLabels, at = barplotBreaks - min(breaksLabels))
  ^~~~~~~~~~~~~
```
[R/histograms.R:32:1:](https://github.com/PredictiveEcology/LandWebUtils/blob/bae5f9cbc04b28048ecf2268ba607fa6e40530a0/R/histograms.R#L32) *style:* **Lines should not be more than 80 characters.**
```r
  verticalLineAtX <- unique(data$NCC)[1] / breaksInterval + 0.5 # The barplot xaxis is 1/2 a barwidth off
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
```
[R/histograms.R:32:3:](https://github.com/PredictiveEcology/LandWebUtils/blob/bae5f9cbc04b28048ecf2268ba607fa6e40530a0/R/histograms.R#L32) *style:* **Variable or function name should be snake_case.**
```r
  verticalLineAtX <- unique(data$NCC)[1] / breaksInterval + 0.5 # The barplot xaxis is 1/2 a barwidth off
  ^~~~~~~~~~~~~~~
```
[R/histograms.R:37:1:](https://github.com/PredictiveEcology/LandWebUtils/blob/bae5f9cbc04b28048ecf2268ba607fa6e40530a0/R/histograms.R#L37) *style:* **Lines should not be more than 80 characters.**
```r
  if (!is.null(verticalLineAtX)) abline(v = verticalLineAtX, col = "red", lwd = 3)
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
```
[R/histograms.R:57:1:](https://github.com/PredictiveEcology/LandWebUtils/blob/bae5f9cbc04b28048ecf2268ba607fa6e40530a0/R/histograms.R#L57) *style:* **Variable or function name should be snake_case.**
```r
runHistsLargePatches <- function(map, functionName, analysisGroups, dPath) {
^~~~~~~~~~~~~~~~~~~~
```
[R/histograms.R:57:39:](https://github.com/PredictiveEcology/LandWebUtils/blob/bae5f9cbc04b28048ecf2268ba607fa6e40530a0/R/histograms.R#L57) *style:* **Variable or function name should be snake_case.**
```r
runHistsLargePatches <- function(map, functionName, analysisGroups, dPath) {
                                      ^~~~~~~~~~~~
```
[R/histograms.R:57:53:](https://github.com/PredictiveEcology/LandWebUtils/blob/bae5f9cbc04b28048ecf2268ba607fa6e40530a0/R/histograms.R#L57) *style:* **Variable or function name should be snake_case.**
```r
runHistsLargePatches <- function(map, functionName, analysisGroups, dPath) {
                                                    ^~~~~~~~~~~~~~
```
[R/histograms.R:57:69:](https://github.com/PredictiveEcology/LandWebUtils/blob/bae5f9cbc04b28048ecf2268ba607fa6e40530a0/R/histograms.R#L57) *style:* **Variable or function name should be snake_case.**
```r
runHistsLargePatches <- function(map, functionName, analysisGroups, dPath) {
                                                                    ^~~~~
```
[R/histograms.R:58:3:](https://github.com/PredictiveEcology/LandWebUtils/blob/bae5f9cbc04b28048ecf2268ba607fa6e40530a0/R/histograms.R#L58) *style:* **Variable or function name should be snake_case.**
```r
  allRepPolys <- na.omit(map@metadata[[analysisGroups]])
  ^~~~~~~~~~~
```
[R/histograms.R:62:5:](https://github.com/PredictiveEcology/LandWebUtils/blob/bae5f9cbc04b28048ecf2268ba607fa6e40530a0/R/histograms.R#L62) *style:* **Variable or function name should be snake_case.**
```r
    allData <- map@analysesData[[functionName]][["LargePatches"]][[poly]]
    ^~~~~~~
```
[R/histograms.R:64:7:](https://github.com/PredictiveEcology/LandWebUtils/blob/bae5f9cbc04b28048ecf2268ba607fa6e40530a0/R/histograms.R#L64) *style:* **Variable or function name should be snake_case.**
```r
      allData <- map@analysesData[[functionName]][[poly]] ## TODO: fix upstream
      ^~~~~~~
```
[R/histograms.R:66:34:](https://github.com/PredictiveEcology/LandWebUtils/blob/bae5f9cbc04b28048ecf2268ba607fa6e40530a0/R/histograms.R#L66) *warning:* **no visible binding for global variable ‘group’, Did you mean 'drop'?**
```r
    data <- allData[!grepl("CC", group)]
                                 ^~~~~
```
[R/histograms.R:67:5:](https://github.com/PredictiveEcology/LandWebUtils/blob/bae5f9cbc04b28048ecf2268ba607fa6e40530a0/R/histograms.R#L67) *style:* **Variable or function name should be snake_case.**
```r
    dataCC <- allData[grepl("CC", group)]
    ^~~~~~
```
[R/histograms.R:67:35:](https://github.com/PredictiveEcology/LandWebUtils/blob/bae5f9cbc04b28048ecf2268ba607fa6e40530a0/R/histograms.R#L67) *warning:* **no visible binding for global variable ‘group’, Did you mean 'drop'?**
```r
    dataCC <- allData[grepl("CC", group)]
                                  ^~~~~
```
[R/histograms.R:69:1:](https://github.com/PredictiveEcology/LandWebUtils/blob/bae5f9cbc04b28048ecf2268ba607fa6e40530a0/R/histograms.R#L69) *style:* **Lines should not be more than 80 characters.**
```r
    data$rep <- as.numeric(factor(data$group)) ## TODO: workaround for incorrect rep values from LargePatches
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
```
[R/histograms.R:72:5:](https://github.com/PredictiveEcology/LandWebUtils/blob/bae5f9cbc04b28048ecf2268ba607fa6e40530a0/R/histograms.R#L72) *style:* **Variable or function name should be snake_case.**
```r
    slicesNoRep <- slices[slices != "rep"]
    ^~~~~~~~~~~
```
[R/histograms.R:74:19:](https://github.com/PredictiveEcology/LandWebUtils/blob/bae5f9cbc04b28048ecf2268ba607fa6e40530a0/R/histograms.R#L74) *warning:* **no visible binding for global variable ‘ageClass’, Did you mean 'getClass'?**
```r
    data <- data[!ageClass == "NA" | !vegCover == "NA"]
                  ^~~~~~~~
```
[R/histograms.R:74:39:](https://github.com/PredictiveEcology/LandWebUtils/blob/bae5f9cbc04b28048ecf2268ba607fa6e40530a0/R/histograms.R#L74) *warning:* **no visible binding for global variable ‘vegCover’**
```r
    data <- data[!ageClass == "NA" | !vegCover == "NA"]
                                      ^~~~~~~~
```
[R/histograms.R:75:5:](https://github.com/PredictiveEcology/LandWebUtils/blob/bae5f9cbc04b28048ecf2268ba607fa6e40530a0/R/histograms.R#L75) *style:* **Variable or function name should be snake_case.**
```r
    emptyDT <- data.table(expand.grid(ageClass = unique(data$ageClass),
    ^~~~~~~
```
[R/histograms.R:80:5:](https://github.com/PredictiveEcology/LandWebUtils/blob/bae5f9cbc04b28048ecf2268ba607fa6e40530a0/R/histograms.R#L80) *style:* **Variable or function name should be snake_case.**
```r
    patchSizes <- c(100, 500, 1000, 5000) ## minPatchSize <- 100
    ^~~~~~~~~~
```
[R/histograms.R:80:46:](https://github.com/PredictiveEcology/LandWebUtils/blob/bae5f9cbc04b28048ecf2268ba607fa6e40530a0/R/histograms.R#L80) *style:* **Commented code should be removed.**
```r
    patchSizes <- c(100, 500, 1000, 5000) ## minPatchSize <- 100
                                             ^~~~~~~~~~~~~~~~~~~
```
[R/histograms.R:82:41:](https://github.com/PredictiveEcology/LandWebUtils/blob/bae5f9cbc04b28048ecf2268ba607fa6e40530a0/R/histograms.R#L82) *style:* **Variable or function name should be snake_case.**
```r
    fout <- lapply(patchSizes, function(minPatchSize) {
                                        ^~~~~~~~~~~~
```
[R/histograms.R:83:7:](https://github.com/PredictiveEcology/LandWebUtils/blob/bae5f9cbc04b28048ecf2268ba607fa6e40530a0/R/histograms.R#L83) *style:* **Variable or function name should be snake_case.**
```r
      nClustersDT <- data[sizeInHa >= minPatchSize, .N, by = slices]
      ^~~~~~~~~~~
```
[R/histograms.R:83:27:](https://github.com/PredictiveEcology/LandWebUtils/blob/bae5f9cbc04b28048ecf2268ba607fa6e40530a0/R/histograms.R#L83) *warning:* **no visible binding for global variable ‘sizeInHa’**
```r
      nClustersDT <- data[sizeInHa >= minPatchSize, .N, by = slices]
                          ^~~~~~~~
```
[R/histograms.R:83:53:](https://github.com/PredictiveEcology/LandWebUtils/blob/bae5f9cbc04b28048ecf2268ba607fa6e40530a0/R/histograms.R#L83) *warning:* **no visible binding for global variable ‘.N’, Did you mean 'ar'?**
```r
      nClustersDT <- data[sizeInHa >= minPatchSize, .N, by = slices]
                                                    ^~
```
[R/histograms.R:84:7:](https://github.com/PredictiveEcology/LandWebUtils/blob/bae5f9cbc04b28048ecf2268ba607fa6e40530a0/R/histograms.R#L84) *style:* **Variable or function name should be snake_case.**
```r
      nClustersDT <- nClustersDT[emptyDT, on = slices, nomatch = NA]
      ^~~~~~~~~~~
```
[R/histograms.R:85:25:](https://github.com/PredictiveEcology/LandWebUtils/blob/bae5f9cbc04b28048ecf2268ba607fa6e40530a0/R/histograms.R#L85) *warning:* **no visible binding for global variable ‘N’, Did you mean 'C'?**
```r
      nClustersDT[is.na(N), N := 0]
                        ^
```
[R/histograms.R:85:25:](https://github.com/PredictiveEcology/LandWebUtils/blob/bae5f9cbc04b28048ecf2268ba607fa6e40530a0/R/histograms.R#L85) *warning:* **no visible binding for global variable ‘N’, Did you mean 'C'?**
```r
      nClustersDT[is.na(N), N := 0]
                        ^
```
[R/histograms.R:85:29:](https://github.com/PredictiveEcology/LandWebUtils/blob/bae5f9cbc04b28048ecf2268ba607fa6e40530a0/R/histograms.R#L85) *style:* **Variable or function name should be snake_case.**
```r
      nClustersDT[is.na(N), N := 0]
                            ^
```
[R/histograms.R:85:31:](https://github.com/PredictiveEcology/LandWebUtils/blob/bae5f9cbc04b28048ecf2268ba607fa6e40530a0/R/histograms.R#L85) *warning:* **no visible global function definition for ‘:=’, Did you mean ':'?**
```r
      nClustersDT[is.na(N), N := 0]
                              ^~
```
[R/histograms.R:87:7:](https://github.com/PredictiveEcology/LandWebUtils/blob/bae5f9cbc04b28048ecf2268ba607fa6e40530a0/R/histograms.R#L87) *style:* **Variable or function name should be snake_case.**
```r
      nClustersDT_CC <- dataCC[sizeInHa >= minPatchSize, .N, by = slicesNoRep]
      ^~~~~~~~~~~~~~
```
[R/histograms.R:87:32:](https://github.com/PredictiveEcology/LandWebUtils/blob/bae5f9cbc04b28048ecf2268ba607fa6e40530a0/R/histograms.R#L87) *warning:* **no visible binding for global variable ‘sizeInHa’**
```r
      nClustersDT_CC <- dataCC[sizeInHa >= minPatchSize, .N, by = slicesNoRep]
                               ^~~~~~~~
```
[R/histograms.R:87:58:](https://github.com/PredictiveEcology/LandWebUtils/blob/bae5f9cbc04b28048ecf2268ba607fa6e40530a0/R/histograms.R#L87) *warning:* **no visible binding for global variable ‘.N’, Did you mean 'ar'?**
```r
      nClustersDT_CC <- dataCC[sizeInHa >= minPatchSize, .N, by = slicesNoRep]
                                                         ^~
```
[R/histograms.R:88:8:](https://github.com/PredictiveEcology/LandWebUtils/blob/bae5f9cbc04b28048ecf2268ba607fa6e40530a0/R/histograms.R#L88) *style:* **Commented code should be removed.**
```r
      #nClustersDT_CC$rep <- as.numeric(nClustersDT_CC$rep)
       ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
```
[R/histograms.R:89:7:](https://github.com/PredictiveEcology/LandWebUtils/blob/bae5f9cbc04b28048ecf2268ba607fa6e40530a0/R/histograms.R#L89) *warning:* **no visible global function definition for ‘setnames’, Did you mean 'setNames'?**
```r
      setnames(nClustersDT_CC, "N", "NCC")
      ^~~~~~~~
```
[R/histograms.R:90:7:](https://github.com/PredictiveEcology/LandWebUtils/blob/bae5f9cbc04b28048ecf2268ba607fa6e40530a0/R/histograms.R#L90) *style:* **Variable or function name should be snake_case.**
```r
      nClustersDT_CC <- nClustersDT_CC[emptyDT, on = slicesNoRep, nomatch = NA]
      ^~~~~~~~~~~~~~
```
[R/histograms.R:91:28:](https://github.com/PredictiveEcology/LandWebUtils/blob/bae5f9cbc04b28048ecf2268ba607fa6e40530a0/R/histograms.R#L91) *warning:* **no visible binding for global variable ‘NCC’, Did you mean 'AIC'?**
```r
      nClustersDT_CC[is.na(NCC), NCC := 0]
                           ^~~
```
[R/histograms.R:91:28:](https://github.com/PredictiveEcology/LandWebUtils/blob/bae5f9cbc04b28048ecf2268ba607fa6e40530a0/R/histograms.R#L91) *warning:* **no visible binding for global variable ‘NCC’, Did you mean 'AIC'?**
```r
      nClustersDT_CC[is.na(NCC), NCC := 0]
                           ^~~
```
[R/histograms.R:91:34:](https://github.com/PredictiveEcology/LandWebUtils/blob/bae5f9cbc04b28048ecf2268ba607fa6e40530a0/R/histograms.R#L91) *style:* **Variable or function name should be snake_case.**
```r
      nClustersDT_CC[is.na(NCC), NCC := 0]
                                 ^~~
```
[R/histograms.R:91:38:](https://github.com/PredictiveEcology/LandWebUtils/blob/bae5f9cbc04b28048ecf2268ba607fa6e40530a0/R/histograms.R#L91) *warning:* **no visible global function definition for ‘:=’, Did you mean ':'?**
```r
      nClustersDT_CC[is.na(NCC), NCC := 0]
                                     ^~
```
[R/histograms.R:93:7:](https://github.com/PredictiveEcology/LandWebUtils/blob/bae5f9cbc04b28048ecf2268ba607fa6e40530a0/R/histograms.R#L93) *style:* **Variable or function name should be snake_case.**
```r
      nClustersDT <- nClustersDT[nClustersDT_CC, on = slices]
      ^~~~~~~~~~~
```
[R/histograms.R:97:1:](https://github.com/PredictiveEcology/LandWebUtils/blob/bae5f9cbc04b28048ecf2268ba607fa6e40530a0/R/histograms.R#L97) *style:* **Lines should not be more than 80 characters.**
```r
                                                         "_", minPatchSize, ".csv"))))
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
```
[R/histograms.R:99:1:](https://github.com/PredictiveEcology/LandWebUtils/blob/bae5f9cbc04b28048ecf2268ba607fa6e40530a0/R/histograms.R#L99) *style:* **Lines should not be more than 80 characters.**
```r
      saveDir <- checkPath(file.path(dPath, poly, "largePatches", minPatchSize), create = TRUE)
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
```
[R/histograms.R:99:7:](https://github.com/PredictiveEcology/LandWebUtils/blob/bae5f9cbc04b28048ecf2268ba607fa6e40530a0/R/histograms.R#L99) *style:* **Variable or function name should be snake_case.**
```r
      saveDir <- checkPath(file.path(dPath, poly, "largePatches", minPatchSize), create = TRUE)
      ^~~~~~~
```
[R/histograms.R:99:7:](https://github.com/PredictiveEcology/LandWebUtils/blob/bae5f9cbc04b28048ecf2268ba607fa6e40530a0/R/histograms.R#L99) *warning:* **local variable ‘saveDir’ assigned but may not be used**
```r
      saveDir <- checkPath(file.path(dPath, poly, "largePatches", minPatchSize), create = TRUE)
      ^~~~~~~
```
[R/histograms.R:99:18:](https://github.com/PredictiveEcology/LandWebUtils/blob/bae5f9cbc04b28048ecf2268ba607fa6e40530a0/R/histograms.R#L99) *warning:* **no visible global function definition for ‘checkPath’**
```r
      saveDir <- checkPath(file.path(dPath, poly, "largePatches", minPatchSize), create = TRUE)
                 ^~~~~~~~~
```
[R/histograms.R:100:7:](https://github.com/PredictiveEcology/LandWebUtils/blob/bae5f9cbc04b28048ecf2268ba607fa6e40530a0/R/histograms.R#L100) *style:* **Variable or function name should be snake_case.**
```r
      savePng <- quote(file.path(saveDir, paste0(paste(unique(polygonName),
      ^~~~~~~
```
[R/histograms.R:103:1:](https://github.com/PredictiveEcology/LandWebUtils/blob/bae5f9cbc04b28048ecf2268ba607fa6e40530a0/R/histograms.R#L103) *style:* **Lines should not be more than 80 characters.**
```r
                                                       collapse = " "), ".png")))
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
```
[R/histograms.R:105:8:](https://github.com/PredictiveEcology/LandWebUtils/blob/bae5f9cbc04b28048ecf2268ba607fa6e40530a0/R/histograms.R#L105) *style:* **Commented code should be removed.**
```r
      #browser()
       ^~~~~~~~~
```
[R/histograms.R:117:1:](https://github.com/PredictiveEcology/LandWebUtils/blob/bae5f9cbc04b28048ecf2268ba607fa6e40530a0/R/histograms.R#L117) *style:* **Lines should not be more than 80 characters.**
```r
                                              xlab = paste0("Number of patches greater than ",
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
```
[R/histograms.R:118:1:](https://github.com/PredictiveEcology/LandWebUtils/blob/bae5f9cbc04b28048ecf2268ba607fa6e40530a0/R/histograms.R#L118) *style:* **Lines should not be more than 80 characters.**
```r
                                                            minPatchSize, " ha"),
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
```
[R/largePatches.R:25:1:](https://github.com/PredictiveEcology/LandWebUtils/blob/bae5f9cbc04b28048ecf2268ba607fa6e40530a0/R/largePatches.R#L25) *style:* **Lines should not be more than 80 characters.**
```r
LargePatches <- function(tsf, vtm, poly, labelColumn, id, ageClassCutOffs, ageClasses,
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
```
[R/largePatches.R:25:1:](https://github.com/PredictiveEcology/LandWebUtils/blob/bae5f9cbc04b28048ecf2268ba607fa6e40530a0/R/largePatches.R#L25) *style:* **Variable or function name should be snake_case.**
```r
LargePatches <- function(tsf, vtm, poly, labelColumn, id, ageClassCutOffs, ageClasses,
^~~~~~~~~~~~
```
[R/largePatches.R:25:42:](https://github.com/PredictiveEcology/LandWebUtils/blob/bae5f9cbc04b28048ecf2268ba607fa6e40530a0/R/largePatches.R#L25) *style:* **Variable or function name should be snake_case.**
```r
LargePatches <- function(tsf, vtm, poly, labelColumn, id, ageClassCutOffs, ageClasses,
                                         ^~~~~~~~~~~
```
[R/largePatches.R:25:59:](https://github.com/PredictiveEcology/LandWebUtils/blob/bae5f9cbc04b28048ecf2268ba607fa6e40530a0/R/largePatches.R#L25) *style:* **Variable or function name should be snake_case.**
```r
LargePatches <- function(tsf, vtm, poly, labelColumn, id, ageClassCutOffs, ageClasses,
                                                          ^~~~~~~~~~~~~~~
```
[R/largePatches.R:25:76:](https://github.com/PredictiveEcology/LandWebUtils/blob/bae5f9cbc04b28048ecf2268ba607fa6e40530a0/R/largePatches.R#L25) *style:* **Variable or function name should be snake_case.**
```r
LargePatches <- function(tsf, vtm, poly, labelColumn, id, ageClassCutOffs, ageClasses,
                                                                           ^~~~~~~~~~
```
[R/largePatches.R:26:26:](https://github.com/PredictiveEcology/LandWebUtils/blob/bae5f9cbc04b28048ecf2268ba607fa6e40530a0/R/largePatches.R#L26) *style:* **Variable or function name should be snake_case.**
```r
                         sppEquivCol, sppEquiv) {
                         ^~~~~~~~~~~
```
[R/largePatches.R:26:39:](https://github.com/PredictiveEcology/LandWebUtils/blob/bae5f9cbc04b28048ecf2268ba607fa6e40530a0/R/largePatches.R#L26) *style:* **Variable or function name should be snake_case.**
```r
                         sppEquivCol, sppEquiv) {
                                      ^~~~~~~~
```
[R/largePatches.R:32:3:](https://github.com/PredictiveEcology/LandWebUtils/blob/bae5f9cbc04b28048ecf2268ba607fa6e40530a0/R/largePatches.R#L32) *style:* **Variable or function name should be snake_case.**
```r
  timeSinceFireFilesRast <- Cache(.rasterToMemory, tsf[1])
  ^~~~~~~~~~~~~~~~~~~~~~
```
[R/largePatches.R:32:29:](https://github.com/PredictiveEcology/LandWebUtils/blob/bae5f9cbc04b28048ecf2268ba607fa6e40530a0/R/largePatches.R#L32) *warning:* **no visible global function definition for ‘Cache’**
```r
  timeSinceFireFilesRast <- Cache(.rasterToMemory, tsf[1])
                            ^~~~~
```
[R/largePatches.R:32:35:](https://github.com/PredictiveEcology/LandWebUtils/blob/bae5f9cbc04b28048ecf2268ba607fa6e40530a0/R/largePatches.R#L32) *warning:* **no visible binding for global variable ‘.rasterToMemory’**
```r
  timeSinceFireFilesRast <- Cache(.rasterToMemory, tsf[1])
                                  ^~~~~~~~~~~~~~~
```
[R/largePatches.R:41:3:](https://github.com/PredictiveEcology/LandWebUtils/blob/bae5f9cbc04b28048ecf2268ba607fa6e40530a0/R/largePatches.R#L41) *style:* **Variable or function name should be snake_case.**
```r
  rasRepPoly <- Cache(
  ^~~~~~~~~~
```
[R/largePatches.R:44:1:](https://github.com/PredictiveEcology/LandWebUtils/blob/bae5f9cbc04b28048ecf2268ba607fa6e40530a0/R/largePatches.R#L44) *style:* **Lines should not be more than 80 characters.**
```r
    emptyRaster = raster(timeSinceFireFilesRast), # doesn't need to the data -- makes Caching more effective
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
```
[R/largePatches.R:49:3:](https://github.com/PredictiveEcology/LandWebUtils/blob/bae5f9cbc04b28048ecf2268ba607fa6e40530a0/R/largePatches.R#L49) *style:* **Variable or function name should be snake_case.**
```r
  rasVeg <- Cache(.rasterToMemory, vtm)
  ^~~~~~
```
[R/largePatches.R:49:13:](https://github.com/PredictiveEcology/LandWebUtils/blob/bae5f9cbc04b28048ecf2268ba607fa6e40530a0/R/largePatches.R#L49) *warning:* **no visible global function definition for ‘Cache’**
```r
  rasVeg <- Cache(.rasterToMemory, vtm)
            ^~~~~
```
[R/largePatches.R:49:19:](https://github.com/PredictiveEcology/LandWebUtils/blob/bae5f9cbc04b28048ecf2268ba607fa6e40530a0/R/largePatches.R#L49) *warning:* **no visible binding for global variable ‘.rasterToMemory’**
```r
  rasVeg <- Cache(.rasterToMemory, vtm)
                  ^~~~~~~~~~~~~~~
```
[R/largePatches.R:51:1:](https://github.com/PredictiveEcology/LandWebUtils/blob/bae5f9cbc04b28048ecf2268ba607fa6e40530a0/R/largePatches.R#L51) *style:* **Lines should not be more than 80 characters.**
```r
  splitVal <- paste0("_", 75757575, "_") # unlikely to occur for any other reason
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
```
[R/largePatches.R:51:3:](https://github.com/PredictiveEcology/LandWebUtils/blob/bae5f9cbc04b28048ecf2268ba607fa6e40530a0/R/largePatches.R#L51) *style:* **Variable or function name should be snake_case.**
```r
  splitVal <- paste0("_", 75757575, "_") # unlikely to occur for any other reason
  ^~~~~~~~
```
[R/largePatches.R:55:35:](https://github.com/PredictiveEcology/LandWebUtils/blob/bae5f9cbc04b28048ecf2268ba607fa6e40530a0/R/largePatches.R#L55) *warning:* **no visible global function definition for ‘factorValues2’**
```r
  nas2 <- is.na(rasVeg[]) | is.na(factorValues2(rasVeg, rasVeg[], att = 1))
                                  ^~~~~~~~~~~~~
```
[R/largePatches.R:60:6:](https://github.com/PredictiveEcology/LandWebUtils/blob/bae5f9cbc04b28048ecf2268ba607fa6e40530a0/R/largePatches.R#L60) *style:* **Commented code should be removed.**
```r
    #name1a <- as.character(raster::levels(tsf)[[1]]$Factor)[tsf[][!nas]]
     ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
```
[R/largePatches.R:61:27:](https://github.com/PredictiveEcology/LandWebUtils/blob/bae5f9cbc04b28048ecf2268ba607fa6e40530a0/R/largePatches.R#L61) *warning:* **no visible global function definition for ‘factorValues2’**
```r
    name1 <- as.character(factorValues2(tsf, tsf[], att = 2)[!nas])
                          ^~~~~~~~~~~~~
```
[R/largePatches.R:63:1:](https://github.com/PredictiveEcology/LandWebUtils/blob/bae5f9cbc04b28048ecf2268ba607fa6e40530a0/R/largePatches.R#L63) *style:* **Lines should not be more than 80 characters.**
```r
    colID <- which(colnames(raster::levels(rasVeg)[[1]]) %in% c("category", "Factor", "VALUE"))
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
```
[R/largePatches.R:63:5:](https://github.com/PredictiveEcology/LandWebUtils/blob/bae5f9cbc04b28048ecf2268ba607fa6e40530a0/R/largePatches.R#L63) *style:* **Variable or function name should be snake_case.**
```r
    colID <- which(colnames(raster::levels(rasVeg)[[1]]) %in% c("category", "Factor", "VALUE"))
    ^~~~~
```
[R/largePatches.R:65:1:](https://github.com/PredictiveEcology/LandWebUtils/blob/bae5f9cbc04b28048ecf2268ba607fa6e40530a0/R/largePatches.R#L65) *style:* **Lines should not be more than 80 characters.**
```r
    #name2a <- as.character(raster::levels(rasVeg)[[1]][[colID]])[rasVeg[][!nas]]
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
```
[R/largePatches.R:65:6:](https://github.com/PredictiveEcology/LandWebUtils/blob/bae5f9cbc04b28048ecf2268ba607fa6e40530a0/R/largePatches.R#L65) *style:* **Commented code should be removed.**
```r
    #name2a <- as.character(raster::levels(rasVeg)[[1]][[colID]])[rasVeg[][!nas]]
     ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
```
[R/largePatches.R:66:27:](https://github.com/PredictiveEcology/LandWebUtils/blob/bae5f9cbc04b28048ecf2268ba607fa6e40530a0/R/largePatches.R#L66) *warning:* **no visible global function definition for ‘factorValues2’**
```r
    name2 <- as.character(factorValues2(rasVeg, rasVeg[], att = colID)[!nas])
                          ^~~~~~~~~~~~~
```
[R/largePatches.R:72:1:](https://github.com/PredictiveEcology/LandWebUtils/blob/bae5f9cbc04b28048ecf2268ba607fa6e40530a0/R/largePatches.R#L72) *style:* **Lines should not be more than 80 characters.**
```r
    if (!identical(length(name1), length(name2)) || !identical(length(name1), length(name3)))
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
```
[R/largePatches.R:73:1:](https://github.com/PredictiveEcology/LandWebUtils/blob/bae5f9cbc04b28048ecf2268ba607fa6e40530a0/R/largePatches.R#L73) *style:* **Lines should not be more than 80 characters.**
```r
      stop("There is something wrong with tsf or rasVeg or rasRepPoly inside LargePatches")
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
```
[R/largePatches.R:76:12:](https://github.com/PredictiveEcology/LandWebUtils/blob/bae5f9cbc04b28048ecf2268ba607fa6e40530a0/R/largePatches.R#L76) *warning:* **no visible global function definition for ‘raster’, Did you mean 'rasVeg'?**
```r
    ras <- raster(rasVeg)
           ^~~~~~
```
[R/largePatches.R:77:5:](https://github.com/PredictiveEcology/LandWebUtils/blob/bae5f9cbc04b28048ecf2268ba607fa6e40530a0/R/largePatches.R#L77) *style:* **Variable or function name should be snake_case.**
```r
    ffFactor <- factor(ff)
    ^~~~~~~~
```
[R/largePatches.R:78:1:](https://github.com/PredictiveEcology/LandWebUtils/blob/bae5f9cbc04b28048ecf2268ba607fa6e40530a0/R/largePatches.R#L78) *style:* **Lines should not be more than 80 characters.**
```r
    ras[!nas] <- ffFactor # 2 seconds ## note: sum(!nas, na.rm = TRUE) should equal length(ffFactor)
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
```
[R/largePatches.R:80:1:](https://github.com/PredictiveEcology/LandWebUtils/blob/bae5f9cbc04b28048ecf2268ba607fa6e40530a0/R/largePatches.R#L80) *style:* **Lines should not be more than 80 characters.**
```r
    areaAndPolyOut <- Cache(areaAndPolyValue, ras, length = Inf) # maybe lots of NAs on edge
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
```
[R/largePatches.R:80:5:](https://github.com/PredictiveEcology/LandWebUtils/blob/bae5f9cbc04b28048ecf2268ba607fa6e40530a0/R/largePatches.R#L80) *style:* **Variable or function name should be snake_case.**
```r
    areaAndPolyOut <- Cache(areaAndPolyValue, ras, length = Inf) # maybe lots of NAs on edge
    ^~~~~~~~~~~~~~
```
[R/largePatches.R:80:23:](https://github.com/PredictiveEcology/LandWebUtils/blob/bae5f9cbc04b28048ecf2268ba607fa6e40530a0/R/largePatches.R#L80) *warning:* **no visible global function definition for ‘Cache’**
```r
    areaAndPolyOut <- Cache(areaAndPolyValue, ras, length = Inf) # maybe lots of NAs on edge
                      ^~~~~
```
[R/largePatches.R:80:29:](https://github.com/PredictiveEcology/LandWebUtils/blob/bae5f9cbc04b28048ecf2268ba607fa6e40530a0/R/largePatches.R#L80) *warning:* **no visible binding for global variable ‘areaAndPolyValue’**
```r
    areaAndPolyOut <- Cache(areaAndPolyValue, ras, length = Inf) # maybe lots of NAs on edge
                            ^~~~~~~~~~~~~~~~
```
[R/largePatches.R:81:1:](https://github.com/PredictiveEcology/LandWebUtils/blob/bae5f9cbc04b28048ecf2268ba607fa6e40530a0/R/largePatches.R#L81) *style:* **Lines should not be more than 80 characters.**
```r
    eTable <- data.frame(ID = seq_along(levels(ffFactor)), VALUE = levels(ffFactor))
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
```
[R/largePatches.R:81:5:](https://github.com/PredictiveEcology/LandWebUtils/blob/bae5f9cbc04b28048ecf2268ba607fa6e40530a0/R/largePatches.R#L81) *style:* **Variable or function name should be snake_case.**
```r
    eTable <- data.frame(ID = seq_along(levels(ffFactor)), VALUE = levels(ffFactor))
    ^~~~~~
```
[R/largePatches.R:85:5:](https://github.com/PredictiveEcology/LandWebUtils/blob/bae5f9cbc04b28048ecf2268ba607fa6e40530a0/R/largePatches.R#L85) *style:* **Variable or function name should be snake_case.**
```r
    facPolygonID <- factor(types[areaAndPolyOut$polyID,3])
    ^~~~~~~~~~~~
```
[R/largePatches.R:85:56:](https://github.com/PredictiveEcology/LandWebUtils/blob/bae5f9cbc04b28048ecf2268ba607fa6e40530a0/R/largePatches.R#L85) *style:* **Commas should always have a space after.**
```r
    facPolygonID <- factor(types[areaAndPolyOut$polyID,3])
                                                       ^
```
[R/largePatches.R:86:5:](https://github.com/PredictiveEcology/LandWebUtils/blob/bae5f9cbc04b28048ecf2268ba607fa6e40530a0/R/largePatches.R#L86) *style:* **Variable or function name should be snake_case.**
```r
    outBySpecies <- data.table(polygonID = as.numeric(facPolygonID),
    ^~~~~~~~~~~~
```
[R/largePatches.R:96:12:](https://github.com/PredictiveEcology/LandWebUtils/blob/bae5f9cbc04b28048ecf2268ba607fa6e40530a0/R/largePatches.R#L96) *warning:* **no visible global function definition for ‘raster’, Did you mean 'rasVeg'?**
```r
    ras <- raster(rasVeg)
           ^~~~~~
```
[R/largePatches.R:97:5:](https://github.com/PredictiveEcology/LandWebUtils/blob/bae5f9cbc04b28048ecf2268ba607fa6e40530a0/R/largePatches.R#L97) *style:* **Variable or function name should be snake_case.**
```r
    ffFactor <- factor(ff)
    ^~~~~~~~
```
[R/largePatches.R:101:1:](https://github.com/PredictiveEcology/LandWebUtils/blob/bae5f9cbc04b28048ecf2268ba607fa6e40530a0/R/largePatches.R#L101) *style:* **Lines should not be more than 80 characters.**
```r
    areaAndPolyOut2 <- Cache(areaAndPolyValue, ras, length = Inf) # maybe lots of NAs on edge
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
```
[R/largePatches.R:101:5:](https://github.com/PredictiveEcology/LandWebUtils/blob/bae5f9cbc04b28048ecf2268ba607fa6e40530a0/R/largePatches.R#L101) *style:* **Variable or function name should be snake_case.**
```r
    areaAndPolyOut2 <- Cache(areaAndPolyValue, ras, length = Inf) # maybe lots of NAs on edge
    ^~~~~~~~~~~~~~~
```
[R/largePatches.R:101:24:](https://github.com/PredictiveEcology/LandWebUtils/blob/bae5f9cbc04b28048ecf2268ba607fa6e40530a0/R/largePatches.R#L101) *warning:* **no visible global function definition for ‘Cache’**
```r
    areaAndPolyOut2 <- Cache(areaAndPolyValue, ras, length = Inf) # maybe lots of NAs on edge
                       ^~~~~
```
[R/largePatches.R:101:30:](https://github.com/PredictiveEcology/LandWebUtils/blob/bae5f9cbc04b28048ecf2268ba607fa6e40530a0/R/largePatches.R#L101) *warning:* **no visible binding for global variable ‘areaAndPolyValue’**
```r
    areaAndPolyOut2 <- Cache(areaAndPolyValue, ras, length = Inf) # maybe lots of NAs on edge
                             ^~~~~~~~~~~~~~~~
```
[R/largePatches.R:103:1:](https://github.com/PredictiveEcology/LandWebUtils/blob/bae5f9cbc04b28048ecf2268ba607fa6e40530a0/R/largePatches.R#L103) *style:* **Lines should not be more than 80 characters.**
```r
    eTable <- data.frame(ID = seq_along(levels(ffFactor)), VALUE = levels(ffFactor))
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
```
[R/largePatches.R:103:5:](https://github.com/PredictiveEcology/LandWebUtils/blob/bae5f9cbc04b28048ecf2268ba607fa6e40530a0/R/largePatches.R#L103) *style:* **Variable or function name should be snake_case.**
```r
    eTable <- data.frame(ID = seq_along(levels(ffFactor)), VALUE = levels(ffFactor))
    ^~~~~~
```
[R/largePatches.R:107:5:](https://github.com/PredictiveEcology/LandWebUtils/blob/bae5f9cbc04b28048ecf2268ba607fa6e40530a0/R/largePatches.R#L107) *style:* **Variable or function name should be snake_case.**
```r
    facPolygonID <- factor(types[areaAndPolyOut2$polyID, 2])
    ^~~~~~~~~~~~
```
[R/largePatches.R:109:5:](https://github.com/PredictiveEcology/LandWebUtils/blob/bae5f9cbc04b28048ecf2268ba607fa6e40530a0/R/largePatches.R#L109) *style:* **Variable or function name should be snake_case.**
```r
    outAllSpecies <- data.table(polygonID = as.numeric(facPolygonID),
    ^~~~~~~~~~~~~
```
[R/largePatches.R:116:12:](https://github.com/PredictiveEcology/LandWebUtils/blob/bae5f9cbc04b28048ecf2268ba607fa6e40530a0/R/largePatches.R#L116) *warning:* **no visible global function definition for ‘rbindlist’**
```r
    out <- rbindlist(list(outBySpecies, outAllSpecies))
           ^~~~~~~~~
```
[R/largePatches.R:117:16:](https://github.com/PredictiveEcology/LandWebUtils/blob/bae5f9cbc04b28048ecf2268ba607fa6e40530a0/R/largePatches.R#L117) *warning:* **no visible binding for global variable ‘sizeInHa’**
```r
    out <- out[sizeInHa >= 100] # never will need patches smaller than 100 ha
               ^~~~~~~~
```
[R/largePatches.R:119:1:](https://github.com/PredictiveEcology/LandWebUtils/blob/bae5f9cbc04b28048ecf2268ba607fa6e40530a0/R/largePatches.R#L119) *style:* **Lines should not be more than 80 characters.**
```r
    out <- data.table(polygonID = character(), sizeInHa = numeric(), vegCover = character(),
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
```
[R/largePatches.R:120:1:](https://github.com/PredictiveEcology/LandWebUtils/blob/bae5f9cbc04b28048ecf2268ba607fa6e40530a0/R/largePatches.R#L120) *style:* **Lines should not be more than 80 characters.**
```r
                      rep = numeric(), ageClass = numeric(), polygonName = numeric())
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
```
[R/largePatches.R:124:7:](https://github.com/PredictiveEcology/LandWebUtils/blob/bae5f9cbc04b28048ecf2268ba607fa6e40530a0/R/largePatches.R#L124) *style:* **Variable or function name should be snake_case.**
```r
      vegCover := equivalentName(vegCover, sppEquiv, sppEquivCol)]
      ^~~~~~~~
```
[R/leading.R:11:1:](https://github.com/PredictiveEcology/LandWebUtils/blob/bae5f9cbc04b28048ecf2268ba607fa6e40530a0/R/leading.R#L11) *style:* **Lines should not be more than 80 characters.**
```r
#' It is also recursive of passed a vector of filenames for \code{tsf} and \code{vtm}.
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
```
[R/leading.R:13:1:](https://github.com/PredictiveEcology/LandWebUtils/blob/bae5f9cbc04b28048ecf2268ba607fa6e40530a0/R/leading.R#L13) *style:* **Lines should not be more than 80 characters.**
```r
#' @param tsf A single filename, relative or absolute, pointing to a Time Since Fire raster.
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
```
[R/leading.R:15:1:](https://github.com/PredictiveEcology/LandWebUtils/blob/bae5f9cbc04b28048ecf2268ba607fa6e40530a0/R/leading.R#L15) *style:* **Lines should not be more than 80 characters.**
```r
#' @param vtm A single filename, relative or absolute, pointing to a Vegetation Type Map raster.
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
```
[R/leading.R:17:1:](https://github.com/PredictiveEcology/LandWebUtils/blob/bae5f9cbc04b28048ecf2268ba607fa6e40530a0/R/leading.R#L17) *style:* **Lines should not be more than 80 characters.**
```r
#' @param poly A single \code{SpatialPolygonsDataFrame} object or a factor \code{RasterLayer}.
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
```
[R/leading.R:19:1:](https://github.com/PredictiveEcology/LandWebUtils/blob/bae5f9cbc04b28048ecf2268ba607fa6e40530a0/R/leading.R#L19) *style:* **Lines should not be more than 80 characters.**
```r
#' @param ageClasses A character vector with labels for age classes to bin the \code{tsf} times,
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
```
[R/leading.R:21:1:](https://github.com/PredictiveEcology/LandWebUtils/blob/bae5f9cbc04b28048ecf2268ba607fa6e40530a0/R/leading.R#L21) *style:* **Lines should not be more than 80 characters.**
```r
#' @param ageClassCutOffs A numeric vector with the endpoints for the \code{ageClasses}.
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
```
[R/leading.R:24:1:](https://github.com/PredictiveEcology/LandWebUtils/blob/bae5f9cbc04b28048ecf2268ba607fa6e40530a0/R/leading.R#L24) *style:* **Lines should not be more than 80 characters.**
```r
#' @return A \code{data.table} with proportion of the pixels in each vegetation class,
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
```
[R/leading.R:32:1:](https://github.com/PredictiveEcology/LandWebUtils/blob/bae5f9cbc04b28048ecf2268ba607fa6e40530a0/R/leading.R#L32) *style:* **Lines should not be more than 80 characters.**
```r
LeadingVegTypeByAgeClass <- function(tsf, vtm, poly, ageClassCutOffs, ageClasses) {
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
```
[R/leading.R:32:1:](https://github.com/PredictiveEcology/LandWebUtils/blob/bae5f9cbc04b28048ecf2268ba607fa6e40530a0/R/leading.R#L32) *style:* **Variable or function name should be snake_case.**
```r
LeadingVegTypeByAgeClass <- function(tsf, vtm, poly, ageClassCutOffs, ageClasses) {
^~~~~~~~~~~~~~~~~~~~~~~~
```
[R/leading.R:32:54:](https://github.com/PredictiveEcology/LandWebUtils/blob/bae5f9cbc04b28048ecf2268ba607fa6e40530a0/R/leading.R#L32) *style:* **Variable or function name should be snake_case.**
```r
LeadingVegTypeByAgeClass <- function(tsf, vtm, poly, ageClassCutOffs, ageClasses) {
                                                     ^~~~~~~~~~~~~~~
```
[R/leading.R:32:71:](https://github.com/PredictiveEcology/LandWebUtils/blob/bae5f9cbc04b28048ecf2268ba607fa6e40530a0/R/leading.R#L32) *style:* **Variable or function name should be snake_case.**
```r
LeadingVegTypeByAgeClass <- function(tsf, vtm, poly, ageClassCutOffs, ageClasses) {
                                                                      ^~~~~~~~~~
```
[R/leading.R:34:3:](https://github.com/PredictiveEcology/LandWebUtils/blob/bae5f9cbc04b28048ecf2268ba607fa6e40530a0/R/leading.R#L34) *style:* **Variable or function name should be snake_case.**
```r
  startTime <- Sys.time()
  ^~~~~~~~~
```
[R/leading.R:36:5:](https://github.com/PredictiveEcology/LandWebUtils/blob/bae5f9cbc04b28048ecf2268ba607fa6e40530a0/R/leading.R#L36) *style:* **Variable or function name should be snake_case.**
```r
    ageClassCutOffs <- c(ageClassCutOffs, Inf)
    ^~~~~~~~~~~~~~~
```
[R/leading.R:42:3:](https://github.com/PredictiveEcology/LandWebUtils/blob/bae5f9cbc04b28048ecf2268ba607fa6e40530a0/R/leading.R#L42) *style:* **Variable or function name should be snake_case.**
```r
  timeSinceFireFilesRast <- raster(tsf[1])
  ^~~~~~~~~~~~~~~~~~~~~~
```
[R/leading.R:42:29:](https://github.com/PredictiveEcology/LandWebUtils/blob/bae5f9cbc04b28048ecf2268ba607fa6e40530a0/R/leading.R#L42) *warning:* **no visible global function definition for ‘raster’, Did you mean 'rasVeg'?**
```r
  timeSinceFireFilesRast <- raster(tsf[1])
                            ^~~~~~
```
[R/leading.R:46:4:](https://github.com/PredictiveEcology/LandWebUtils/blob/bae5f9cbc04b28048ecf2268ba607fa6e40530a0/R/leading.R#L46) *style:* **Commented code should be removed.**
```r
  #timeSinceFireFilesRast <- Cache(rasterToMemory, tsf[1])
   ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
```
[R/leading.R:48:3:](https://github.com/PredictiveEcology/LandWebUtils/blob/bae5f9cbc04b28048ecf2268ba607fa6e40530a0/R/leading.R#L48) *style:* **Variable or function name should be snake_case.**
```r
  rasTsf <- reclassify(
  ^~~~~~
```
[R/leading.R:60:3:](https://github.com/PredictiveEcology/LandWebUtils/blob/bae5f9cbc04b28048ecf2268ba607fa6e40530a0/R/leading.R#L60) *style:* **Variable or function name should be snake_case.**
```r
  rasVeg <- raster(vtm[1])
  ^~~~~~
```
[R/leading.R:60:13:](https://github.com/PredictiveEcology/LandWebUtils/blob/bae5f9cbc04b28048ecf2268ba607fa6e40530a0/R/leading.R#L60) *warning:* **no visible global function definition for ‘raster’, Did you mean 'rasVeg'?**
```r
  rasVeg <- raster(vtm[1])
            ^~~~~~
```
[R/leading.R:63:1:](https://github.com/PredictiveEcology/LandWebUtils/blob/bae5f9cbc04b28048ecf2268ba607fa6e40530a0/R/leading.R#L63) *style:* **Lines should not be more than 80 characters.**
```r
  splitVal <- paste0("_", 75757575, "_") # unlikely to occur for any other reason
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
```
[R/leading.R:63:3:](https://github.com/PredictiveEcology/LandWebUtils/blob/bae5f9cbc04b28048ecf2268ba607fa6e40530a0/R/leading.R#L63) *style:* **Variable or function name should be snake_case.**
```r
  splitVal <- paste0("_", 75757575, "_") # unlikely to occur for any other reason
  ^~~~~~~~
```
[R/leading.R:69:25:](https://github.com/PredictiveEcology/LandWebUtils/blob/bae5f9cbc04b28048ecf2268ba607fa6e40530a0/R/leading.R#L69) *warning:* **no visible global function definition for ‘factorValues’**
```r
  name1 <- as.character(factorValues(rasTsf, rasTsf[][!nas])[, 1])
                        ^~~~~~~~~~~~
```
[R/leading.R:70:4:](https://github.com/PredictiveEcology/LandWebUtils/blob/bae5f9cbc04b28048ecf2268ba607fa6e40530a0/R/leading.R#L70) *style:* **Commented code should be removed.**
```r
  #as.character(raster::levels(rasTsf)[[1]]$Factor)[rasTsf[][!nas]]
   ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
```
[R/leading.R:71:25:](https://github.com/PredictiveEcology/LandWebUtils/blob/bae5f9cbc04b28048ecf2268ba607fa6e40530a0/R/leading.R#L71) *warning:* **no visible global function definition for ‘factorValues’**
```r
  name3 <- as.character(factorValues(rasVeg, rasVeg[][!nas])[, 1])
                        ^~~~~~~~~~~~
```
[R/leading.R:72:4:](https://github.com/PredictiveEcology/LandWebUtils/blob/bae5f9cbc04b28048ecf2268ba607fa6e40530a0/R/leading.R#L72) *style:* **Commented code should be removed.**
```r
  #as.character(raster::levels(rasVeg)[[1]]$Factor)[rasVeg[][!nas]]
   ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
```
[R/leading.R:75:10:](https://github.com/PredictiveEcology/LandWebUtils/blob/bae5f9cbc04b28048ecf2268ba607fa6e40530a0/R/leading.R#L75) *warning:* **no visible global function definition for ‘raster’, Did you mean 'rasVeg'?**
```r
  ras <- raster(rasVeg)
         ^~~~~~
```
[R/leading.R:76:3:](https://github.com/PredictiveEcology/LandWebUtils/blob/bae5f9cbc04b28048ecf2268ba607fa6e40530a0/R/leading.R#L76) *style:* **Variable or function name should be snake_case.**
```r
  ffFactor <- factor(ff)
  ^~~~~~~~
```
[R/leading.R:79:1:](https://github.com/PredictiveEcology/LandWebUtils/blob/bae5f9cbc04b28048ecf2268ba607fa6e40530a0/R/leading.R#L79) *style:* **Lines should not be more than 80 characters.**
```r
  eTable <- data.frame(ID = seq_along(levels(ffFactor)), VALUE = levels(ffFactor))
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
```


Ship it.


Yes: --metadata-from-file startup-script=startup-script.sh

https://cloud.google.com/sdk/gcloud/reference/compute/instances/add-metadata

I'll invite you to a colab notebook where I use it.


develop (jasondegraw) - x86_64-Linux-Ubuntu-18.04-cppcheck: OK (0 of 0 tests passed, 0 test warnings)

![Build Badge](http://img.shields.io/badge/build%20status-passing-green.png)


Successfully aliased the URL <https://vue-warehouse-8v6jzc842.now.sh> to the following aliases:

* https://vue-warehouse-examples.bazzite-opensource.now.sh
* https://vue-warehouse.bazzite-opensource.now.sh
* https://vue-warehouse-git-develop.bazzite-opensource.now.sh


Fixing the inconsistent function signature.


[AutoCommit.AllCommitPathsOpened.ForThisFILE]


develop (jasondegraw) - x86_64-Linux-Ubuntu-18.04-custom_check: OK (9 of 9 tests passed, 0 test warnings)

![Build Badge](http://img.shields.io/badge/build%20status-passing-green.png)


Testing Update


Successfully aliased the URL <https://portfolio-o72arppss.now.sh> to the following aliases:

* https://honai.me
* https://portfolio.honai.now.sh
* https://portfolio-git-master.honai.now.sh


common typo: should this be `overridden`?


same for these: `overridden`


Successfully aliased the URL <https://stmusic-streamer-hgbx61ky6.now.sh> to the following aliases:

* https://stmusic-streamer.mayconbenito.now.sh
* https://stmusic-streamer-git-master.mayconbenito.now.sh


I'm actually wrong on this one. This will return `"null"` instead of `null` if value is null,