Skip to content

Commit

Permalink
fix #69 fix vertsummary
Browse files Browse the repository at this point in the history
  • Loading branch information
sckott committed Aug 10, 2020
1 parent ad79d82 commit a3a48e7
Show file tree
Hide file tree
Showing 3 changed files with 1,718 additions and 34 deletions.
8 changes: 4 additions & 4 deletions R/yyy.R
Original file line number Diff line number Diff line change
Expand Up @@ -32,16 +32,16 @@ vertsumwrapper <- function(input = NULL, verbose = TRUE){
input$coordinateuncertaintyinmeters <- as.numeric(as.character(input$coordinateuncertaintyinmeters))
}
mappable <- input[stats::complete.cases(input[,c('decimallatitude','decimallongitude')]),]
mappable <- subset(mappable, input$decimallatitude < 90 & input$decimallatitude > -90)
mappable <- subset(mappable, input$decimallongitude < 180 & input$decimallongitude > -180)
mappable <- subset(mappable, mappable$decimallatitude < 90 & mappable$decimallatitude > -90)
mappable <- subset(mappable, mappable$decimallongitude < 180 & mappable$decimallongitude > -180)
if (nrow(mappable) < coords) {
bad <- coords - nrow(mappable)
mssg(verbose, paste(bad, " record(s) with bad coordinates"))
coords <- coords - bad
}
if (is.null(errest)) {
mappable <- subset(mappable, input$coordinateuncertaintyinmeters > 0 &
input$coordinateuncertaintyinmeters < 20020000)
mappable <- subset(mappable, mappable$coordinateuncertaintyinmeters > 0 &
mappable$coordinateuncertaintyinmeters < 20020000)
if ((errest <- nrow(mappable)) < coords) {
bad <- coords - errest
}
Expand Down
Loading

0 comments on commit a3a48e7

Please sign in to comment.