[Rodbcext-commits] r55 - in pkg/geoclimate: . R
noreply at r-forge.r-project.org
noreply at r-forge.r-project.org
Thu Nov 13 04:19:17 CET 2014
Author: jaunario
Date: 2014-11-13 04:19:16 +0100 (Thu, 13 Nov 2014)
New Revision: 55
Modified:
pkg/geoclimate/DESCRIPTION
pkg/geoclimate/R/fetch.r
Log:
Fixed "*" or "all" option for srcvars. Removed ncdf from suggested packages
Modified: pkg/geoclimate/DESCRIPTION
===================================================================
--- pkg/geoclimate/DESCRIPTION 2014-06-24 03:25:01 UTC (rev 54)
+++ pkg/geoclimate/DESCRIPTION 2014-11-13 03:19:16 UTC (rev 55)
@@ -1,10 +1,10 @@
Package: geoclimate
Type: Package
Title: Climate and Weather Data Processing at the IRRI GIS Laboratory
-Version: 0.1.2
+Version: 0.1.3
Date: 2013-6-4
Depends: methods, genutils, oldweather, RODBC
-Suggests: RCurl, ncdf
+Suggests: RCurl
Author: Jorrel Khalil S. Aunario
Maintainer: <jaunario at gmail.com>
Description: [description]
Modified: pkg/geoclimate/R/fetch.r
===================================================================
--- pkg/geoclimate/R/fetch.r 2014-06-24 03:25:01 UTC (rev 54)
+++ pkg/geoclimate/R/fetch.r 2014-11-13 03:19:16 UTC (rev 55)
@@ -96,6 +96,8 @@
stdcells <- cellFromXY(baseraster,xy)
tmp <- .fetch(cells=stdcells, con=connection, wset=paste(srcm$schema_name,srcm$table_name, sep=".") , vars=srcvars[[i]], timestep=TS.monthly, ...)
+ if(length(srcvars[[i]])==1 & (is.na(srcvars[[i]]) | tolower(srcvars[[i]])=="all" | srcvars[[i]]=="*")) srcvars[[i]] <- colnames(tmp)[!colnames(tmp) %in% c("cell", "wdate", "idx")]
+
#tmp <- fetch(cells=stdcells, con=connection, wset=paste(srcm$schema_name,srcm$table_name, sep=".") , vars=srcvars[[i]])
tmp$idx <- match(tmp$cell, stdcells)
tmp[,srcvars[[i]]] <- tmp[,srcvars[[i]]]/srcm$zval
@@ -165,6 +167,7 @@
stdcells <- cellFromXY(baseraster,xy)
tmp <- .fetch(cells=stdcells, con=connection, wset=paste(srcm$schema_name,srcm$table_name, sep=".") , vars=srcvars[[i]], timestep=TS.daily, ...)
+ if(length(srcvars[[i]])==1 & (is.na(srcvars[[i]]) | tolower(srcvars[[i]])=="all" | srcvars[[i]]=="*")) srcvars[[i]] <- colnames(tmp)[!colnames(tmp) %in% c("cell", "wdate", "idx")]
#tmp <- fetch(cells=stdcells, con=connection, wset=paste(srcm$schema_name,srcm$table_name, sep=".") , vars=srcvars[[i]])
tmp$idx <- match(tmp$cell, stdcells)
tmp[,srcvars[[i]]] <- tmp[,srcvars[[i]]]/srcm$zval
More information about the Rodbcext-commits
mailing list