From 9b3a703ac1a8ffd0869514fd44844c0d22d8a34b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Oscar=20Perpi=C3=B1=C3=A1n?= Date: Mon, 7 Jul 2014 15:03:56 +0200 Subject: [PATCH] lat and lon are incorrectly parsed --- R/getPoint.R | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/R/getPoint.R b/R/getPoint.R index 20331f7..76c0cbd 100644 --- a/R/getPoint.R +++ b/R/getPoint.R @@ -31,8 +31,8 @@ getPoint <- function(point, vars='swflx', stop('Data not found. Check the date and variables name.\nURL: ', completeURL) z <- read.csv(tmpfile) idx <- as.POSIXct(z[,1], format='%Y-%m-%dT%H:%M:%SZ') - lat <- as.numeric(z[1, 2]) - lon <- as.numeric(z[1, 3]) + lat <- as.numeric(as.character(z[1, 2])) + lon <- as.numeric(as.character(z[1, 3])) z <- zoo(z[, -c(1, 2, 3)], idx) names(z) <- vars