Thread: [R-gregmisc-users] SF.net SVN: r-gregmisc:[1384] trunk/gdata/R/xls2sep.R
Brought to you by:
warnes
From: <wa...@us...> - 2010-01-23 05:51:53
|
Revision: 1384 http://r-gregmisc.svn.sourceforge.net/r-gregmisc/?rev=1384&view=rev Author: warnes Date: 2010-01-23 05:51:47 +0000 (Sat, 23 Jan 2010) Log Message: ----------- Add xls2tsv() convenience wrapper to xls2sep() Modified Paths: -------------- trunk/gdata/R/xls2sep.R Modified: trunk/gdata/R/xls2sep.R =================================================================== --- trunk/gdata/R/xls2sep.R 2010-01-23 05:50:10 UTC (rev 1383) +++ trunk/gdata/R/xls2sep.R 2010-01-23 05:51:47 UTC (rev 1384) @@ -8,6 +8,10 @@ xls2sep(xls=xls, sheet=sheet, verbose=verbose, ..., method="tab", perl=perl) +xls2tsv <- function(xls, sheet=1, verbose=FALSE, ..., perl="perl") + xls2sep(xls=xls, sheet=sheet, verbose=verbose, ..., method="tsv", + perl=perl) + xls2sep <- function(xls, sheet = 1, verbose=FALSE, ..., method=c("csv","tsv","tab"), perl="perl") { This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <wa...@us...> - 2010-01-24 08:06:29
|
Revision: 1394 http://r-gregmisc.svn.sourceforge.net/r-gregmisc/?rev=1394&view=rev Author: warnes Date: 2010-01-24 08:06:23 +0000 (Sun, 24 Jan 2010) Log Message: ----------- Minor formatting change Modified Paths: -------------- trunk/gdata/R/xls2sep.R Modified: trunk/gdata/R/xls2sep.R =================================================================== --- trunk/gdata/R/xls2sep.R 2010-01-24 07:54:36 UTC (rev 1393) +++ trunk/gdata/R/xls2sep.R 2010-01-24 08:06:23 UTC (rev 1394) @@ -12,7 +12,7 @@ xls2sep(xls=xls, sheet=sheet, verbose=verbose, ..., method="tsv", perl=perl) -xls2sep <- function(xls, sheet = 1, verbose=FALSE, ..., +xls2sep <- function(xls, sheet=1, verbose=FALSE, ..., method=c("csv","tsv","tab"), perl="perl") { @@ -25,7 +25,7 @@ ## ## - ## files + ## filesheet tf <- NULL if ( substring(xls, 1, 7) == "http://" || substring(xls, 1, 6) == "ftp://" ) @@ -70,8 +70,12 @@ ## ## execution command - cmd <- paste(perl, script, dQuote.ascii(xls), dQuote.ascii(targetFile), - dQuote.ascii(sheet), sep=" ") + cmd <- paste(dQuote(perl), + dQuote(script), + dQuote.ascii(xls), + dQuote.ascii(targetFile), + dQuote.ascii(sheet), + sep=" ") ## ## @@ -89,7 +93,7 @@ ## ## do the translation - if(verbose) cat("Executing ", cmd, "... \n\n") + if(verbose) cat("Executing '", cmd, "'... \n\n") ## results <- system(cmd, intern=!verbose) ## This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <wa...@us...> - 2010-01-25 00:43:06
|
Revision: 1411 http://r-gregmisc.svn.sourceforge.net/r-gregmisc/?rev=1411&view=rev Author: warnes Date: 2010-01-24 23:30:26 +0000 (Sun, 24 Jan 2010) Log Message: ----------- Replace two calls to 'dQuote', to 'dQuote.ascii' Modified Paths: -------------- trunk/gdata/R/xls2sep.R Modified: trunk/gdata/R/xls2sep.R =================================================================== --- trunk/gdata/R/xls2sep.R 2010-01-24 23:26:17 UTC (rev 1410) +++ trunk/gdata/R/xls2sep.R 2010-01-24 23:30:26 UTC (rev 1411) @@ -68,8 +68,8 @@ ## ## execution command - cmd <- paste(dQuote(perl), - dQuote(script), + cmd <- paste(dQuote.ascii(perl), + dQuote.ascii(script), dQuote.ascii(xls), dQuote.ascii(targetFile), dQuote.ascii(sheet), This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <wa...@us...> - 2010-01-28 19:56:30
|
Revision: 1418 http://r-gregmisc.svn.sourceforge.net/r-gregmisc/?rev=1418&view=rev Author: warnes Date: 2010-01-28 19:56:21 +0000 (Thu, 28 Jan 2010) Log Message: ----------- xls2sep(): Show output of perl call when verbose=T Modified Paths: -------------- trunk/gdata/R/xls2sep.R Modified: trunk/gdata/R/xls2sep.R =================================================================== --- trunk/gdata/R/xls2sep.R 2010-01-28 16:43:50 UTC (rev 1417) +++ trunk/gdata/R/xls2sep.R 2010-01-28 19:56:21 UTC (rev 1418) @@ -92,6 +92,7 @@ if(verbose) cat("Executing '", cmd, "'... \n\n") ## results <- system(cmd, intern=!verbose) + if(verbose) cat(results,"\n\n") ## if (verbose) cat("Done.\n\n") ## This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ggr...@us...> - 2010-07-08 12:36:54
|
Revision: 1448 http://r-gregmisc.svn.sourceforge.net/r-gregmisc/?rev=1448&view=rev Author: ggrothendieck2 Date: 2010-07-08 12:36:48 +0000 (Thu, 08 Jul 2010) Log Message: ----------- findPerl call added to xls2sep Modified Paths: -------------- trunk/gdata/R/xls2sep.R Modified: trunk/gdata/R/xls2sep.R =================================================================== --- trunk/gdata/R/xls2sep.R 2010-07-07 22:48:16 UTC (rev 1447) +++ trunk/gdata/R/xls2sep.R 2010-07-08 12:36:48 UTC (rev 1448) @@ -13,11 +13,16 @@ perl=perl) xls2sep <- function(xls, sheet=1, verbose=FALSE, ..., - method=c("csv","tsv","tab"), perl="perl") + method=c("csv","tsv","tab"), perl = perl) { method <- match.arg(method) + perl <- if (missing(perl)) + findPerl(verbose = verbose) + else + findPerl(perl, verbose = verbose) + ## ## directories package.dir <- .path.package('gdata') This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |