[Sciviews-commits] r32 - pkg/svMisc/R
noreply at r-forge.r-project.org
noreply at r-forge.r-project.org
Tue Jul 1 09:10:20 CEST 2008
Author: romain
Date: 2008-07-01 09:10:20 +0200 (Tue, 01 Jul 2008)
New Revision: 32
Modified:
pkg/svMisc/R/CompletePlus.R
Log:
add a "simplify" argument to transform the matrix into a printed string
( makes it easier for Javascript )
Modified: pkg/svMisc/R/CompletePlus.R
===================================================================
--- pkg/svMisc/R/CompletePlus.R 2008-06-30 23:15:42 UTC (rev 31)
+++ pkg/svMisc/R/CompletePlus.R 2008-07-01 07:10:20 UTC (rev 32)
@@ -1,4 +1,4 @@
-CompletePlus <- function (linebuffer, cursorPosition = nchar(linebuffer), minlength = 2 ) {
+CompletePlus <- function (linebuffer, cursorPosition = nchar(linebuffer), minlength = 2, simplify = FALSE ) {
utils:::.assignLinebuffer(linebuffer)
utils:::.assignEnd(cursorPosition)
utils:::.guessTokenFromLine()
@@ -53,7 +53,11 @@
out[ test.fun, 3 ] <- desc.fun
}
- out
+ if( simplify ){
+ cat( apply( out, 1, paste, collapse="," ), sep = "\n" )
+ } else {
+ out
+ }
}
More information about the Sciviews-commits
mailing list