[R-gregmisc-users] SF.net SVN: r-gregmisc:[1468] trunk/gdata/R
Brought to you by:
warnes
From: <wa...@us...> - 2011-04-15 20:25:30
|
Revision: 1468 http://r-gregmisc.svn.sourceforge.net/r-gregmisc/?rev=1468&view=rev Author: warnes Date: 2011-04-15 20:25:24 +0000 (Fri, 15 Apr 2011) Log Message: ----------- Fix errors on windows when R or Perl install path includes spaces by properly quoting the path. Modified Paths: -------------- trunk/gdata/R/installXLSXsupport.R trunk/gdata/R/read.xls.R trunk/gdata/R/sheetCount.R trunk/gdata/R/xls2sep.R Removed Paths: ------------- trunk/gdata/R/dQuote.ascii.R Deleted: trunk/gdata/R/dQuote.ascii.R =================================================================== --- trunk/gdata/R/dQuote.ascii.R 2011-04-15 19:43:55 UTC (rev 1467) +++ trunk/gdata/R/dQuote.ascii.R 2011-04-15 20:25:24 UTC (rev 1468) @@ -1,9 +0,0 @@ -## s$Id: read.xls.R 1342 2009-07-16 02:49:11Z warnes $ - -## Double quote string using *ASCII* double quotes. -## -## (The base 'dQuote' uses local-specific quotes (e.g UTF-8 quotes) -## which Unix command line doesn't like.) -## -dQuote.ascii <- function(x) paste('"',x,'"',sep='') - Modified: trunk/gdata/R/installXLSXsupport.R =================================================================== --- trunk/gdata/R/installXLSXsupport.R 2011-04-15 19:43:55 UTC (rev 1467) +++ trunk/gdata/R/installXLSXsupport.R 2011-04-15 20:25:24 UTC (rev 1468) @@ -24,7 +24,7 @@ ## ## execution command - cmd <- paste(perl, sc, sep=" ") + cmd <- paste(shQuote(perl), shQuote(sc), sep=" ") ## Modified: trunk/gdata/R/read.xls.R =================================================================== --- trunk/gdata/R/read.xls.R 2011-04-15 19:43:55 UTC (rev 1467) +++ trunk/gdata/R/read.xls.R 2011-04-15 20:25:24 UTC (rev 1468) @@ -33,7 +33,7 @@ if (missing(pattern)) { if(verbose) - cat("Reading", method, "file ", dQuote.ascii(tfn), "...\n") + cat("Reading", method, "file ", dQuote(tfn), "...\n") if(method=="csv") retval <- read.csv(con, ...) @@ -59,7 +59,7 @@ seek(con, 0) if(verbose) - cat("Reading", method, "file ", dQuote.ascii(tfn), "...\n") + cat("Reading", method, "file ", dQuote(tfn), "...\n") if(method=="csv") retval <- read.csv(con, skip = idx[1]-1, ...) Modified: trunk/gdata/R/sheetCount.R =================================================================== --- trunk/gdata/R/sheetCount.R 2011-04-15 19:43:55 UTC (rev 1467) +++ trunk/gdata/R/sheetCount.R 2011-04-15 20:25:24 UTC (rev 1468) @@ -29,8 +29,8 @@ tf <- paste(tempfile(), "xls", sep = ".") if(verbose) cat("Downloading", - dQuote.ascii(xls), " to ", - dQuote.ascii(tf), "...\n") + dQuote(xls), " to ", + dQuote(tf), "...\n") else cat("Downloading...\n") download.file(xls, tf, mode = "wb") @@ -47,7 +47,7 @@ ## ## execution command - cmd <- paste(perl, sc, dQuote.ascii(xls), sep=" ") + cmd <- paste(shQuote(perl), shQuote(sc), shQuote(xls), sep=" ") ## ## @@ -57,7 +57,7 @@ { cat("\n") cat("Extracting sheet information from\n") - cat(" ", dQuote.ascii(xls), "\n") + cat(" ", dQuote(xls), "\n") cat("... \n\n") } ## Modified: trunk/gdata/R/xls2sep.R =================================================================== --- trunk/gdata/R/xls2sep.R 2011-04-15 19:43:55 UTC (rev 1467) +++ trunk/gdata/R/xls2sep.R 2011-04-15 20:25:24 UTC (rev 1468) @@ -38,8 +38,8 @@ tf <- paste(tempfile(), "xls", sep = ".") if(verbose) cat("Downloading", - dQuote.ascii(xls), " to ", - dQuote.ascii(tf), "...\n") + dQuote(xls), " to ", + dQuote(tf), "...\n") download.file(xls, tf, mode = "wb") if(verbose) cat("Done.\n") xls <- tf @@ -70,11 +70,11 @@ ## ## execution command - cmd <- paste(dQuote.ascii(perl), - dQuote.ascii(script), - dQuote.ascii(xls), - dQuote.ascii(targetFile), - dQuote.ascii(sheet), + cmd <- paste(shQuote(perl), + shQuote(script), + shQuote(xls), + shQuote(targetFile), + shQuote(sheet), sep=" ") ## ## @@ -83,9 +83,9 @@ { cat("\n") cat("Converting xls file\n") - cat(" ", dQuote.ascii(xls), "\n") + cat(" ", dQuote(xls), "\n") cat("to", method, " file \n") - cat(" ", dQuote.ascii(targetFile), "\n") + cat(" ", dQuote(targetFile), "\n") cat("... \n\n") } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |