commit 197f48333b069f185933da4015da63adbb80a883
parent 6bd3ec8a9f9e425b718edb95fdc27ba267113314
Author: eamoncaddigan <eamon.caddigan@gmail.com>
Date: Tue, 19 Apr 2016 14:18:58 -0400
Oops. I forget that West is negative.
Diffstat:
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/R/parseCoordinates.R b/R/parseCoordinates.R
@@ -15,7 +15,7 @@ parseCoordinates <- function(coord) {
# Get the direction
direction <- gsub("[^NSEWnsew]", "", coord)
direction[is.na(direction) | nchar(direction) == 0] <- "1"
- direction <- unname(vapply(direction, switch, numeric(1), S = -1, E = -1, 1))
+ direction <- unname(vapply(direction, switch, numeric(1), S = -1, W = -1, 1))
# Continue parsing the coord
coord <- gsub("[^[:digit:][:punct:]]", "", coord)