[Rodbcext-commits] r28 - pkg/geoclimate/R

noreply at r-forge.r-project.org noreply at r-forge.r-project.org
Mon Jul 16 08:08:56 CEST 2012


Author: jaunario
Date: 2012-07-16 08:08:56 +0200 (Mon, 16 Jul 2012)
New Revision: 28

Modified:
   pkg/geoclimate/R/trmm.r
Log:
Corrected some lines in get.trmm

Modified: pkg/geoclimate/R/trmm.r
===================================================================
--- pkg/geoclimate/R/trmm.r	2012-07-16 06:04:29 UTC (rev 27)
+++ pkg/geoclimate/R/trmm.r	2012-07-16 06:08:56 UTC (rev 28)
@@ -48,7 +48,7 @@
 	}
 	if (class(rawtrmm)=="try-error") stop(rawtrmm)
 	
-	if (class(savepath)=="character" & file.exists(paste(savepath,fname,sep="/"))) writeBin(rawtrmm, paste(savepath,fname,sep="/"))
+	if (class(savepath)=="character" & !file.exists(paste(savepath,fname,sep="/"))) writeBin(rawtrmm, paste(savepath,fname,sep="/"))
 	
 	baseraster <- raster(extent(-180,180,-50,50))
 	res(baseraster) <- 0.25
@@ -65,7 +65,7 @@
 	wth at lon <- c(-180,180)
 	wth at lat <- c(-50,50)
 	wth at w <- as.data.frame(cell)
-	wth at w$wdate <- wdate
+	wth at w$wdate <- as.character(wdate)
 	wth at w$prec <- values(baseraster)
 	rm(baseraster, prec, cell)
 	gc(verbose=FALSE)



More information about the Rodbcext-commits mailing list