From noreply at r-forge.r-project.org Fri Sep 13 19:01:18 2013 From: noreply at r-forge.r-project.org (noreply at r-forge.r-project.org) Date: Fri, 13 Sep 2013 19:01:18 +0200 (CEST) Subject: [Sciviews-commits] r530 - komodo/SciViews-K komodo/SciViews-K/.komodotools komodo/SciViews-K/.komodotools/Project komodo/SciViews-K/components komodo/SciViews-K/content/js pkg/SciViews pkg/SciViews/R pkg/SciViews/man pkg/svDialogs/inst/gui pkg/svDoc pkg/svDoc/R pkg/svDoc/man pkg/svHttp/R pkg/svKomodo/R pkg/svMisc pkg/svMisc/R pkg/svMisc/man pkg/svTools/R Message-ID: <20130913170118.63B10183DE7@r-forge.r-project.org> Author: phgrosjean Date: 2013-09-13 19:01:17 +0200 (Fri, 13 Sep 2013) New Revision: 530 Added: komodo/SciViews-K/.komodotools/Project/ komodo/SciViews-K/.komodotools/Project/.DS_Store komodo/SciViews-K/.komodotools/Project/Build.komodotool komodo/SciViews-K/.komodotools/Project/Configure.komodotool komodo/SciViews-K/.komodotools/Project/extension_lib.komodotool Modified: komodo/SciViews-K/.DS_Store komodo/SciViews-K/.komodotools/Build.komodotool komodo/SciViews-K/.komodotools/Build_and_Install.komodotool komodo/SciViews-K/.komodotools/Docs_-_Extensions.komodotool komodo/SciViews-K/components/koRwiki_UDL_Language.py komodo/SciViews-K/content/js/sciviews.js komodo/SciViews-K/install.rdf pkg/SciViews/DESCRIPTION pkg/SciViews/NAMESPACE pkg/SciViews/NEWS pkg/SciViews/R/correlation.R pkg/SciViews/R/file.R pkg/SciViews/R/pcomp.R pkg/SciViews/TODO pkg/SciViews/man/SciViews-package.Rd pkg/svDialogs/inst/gui/RMenuLinux.txt pkg/svDoc/DESCRIPTION pkg/svDoc/NEWS pkg/svDoc/R/svDoc-internal.R pkg/svDoc/man/svDoc-package.Rd pkg/svHttp/R/httpServer.R pkg/svKomodo/R/svKomodo-internal.R pkg/svMisc/DESCRIPTION pkg/svMisc/NEWS pkg/svMisc/R/captureAll.R pkg/svMisc/R/completion.R pkg/svMisc/R/descFun.R pkg/svMisc/R/isHelp.R pkg/svMisc/R/pkgMan.R pkg/svMisc/R/svMisc-internal.R pkg/svMisc/man/svMisc-package.Rd pkg/svTools/R/completion.R pkg/svTools/R/errorlist.R pkg/svTools/R/lint.R pkg/svTools/R/lintDescription.R pkg/svTools/R/lintNamespace.R Log: Various little changes in SciViews, svDoc, svDialogs, svMisc, svTools, svHttp, svKomodo SciViews-K is now 0.9.31 and we begin updating it for Komodo 8.* Modified: komodo/SciViews-K/.DS_Store =================================================================== (Binary files differ) Modified: komodo/SciViews-K/.komodotools/Build.komodotool =================================================================== --- komodo/SciViews-K/.komodotools/Build.komodotool 2013-03-18 15:47:27 UTC (rev 529) +++ komodo/SciViews-K/.komodotools/Build.komodotool 2013-09-13 17:01:17 UTC (rev 530) @@ -29,7 +29,7 @@ ], "trigger": "", "rank": 100, - "version": "1.0.7", + "version": "1.0.11", "async": 1, "type": "macro", "icon": "chrome://fugue/skin/icons/building--plus.png" Modified: komodo/SciViews-K/.komodotools/Build_and_Install.komodotool =================================================================== --- komodo/SciViews-K/.komodotools/Build_and_Install.komodotool 2013-03-18 15:47:27 UTC (rev 529) +++ komodo/SciViews-K/.komodotools/Build_and_Install.komodotool 2013-09-13 17:01:17 UTC (rev 530) @@ -47,7 +47,7 @@ ], "trigger": "", "rank": 100, - "version": "1.0.7", + "version": "1.0.11", "async": 1, "type": "macro", "icon": "chrome://fugue/skin/icons/building--arrow.png" Modified: komodo/SciViews-K/.komodotools/Docs_-_Extensions.komodotool =================================================================== --- komodo/SciViews-K/.komodotools/Docs_-_Extensions.komodotool 2013-03-18 15:47:27 UTC (rev 529) +++ komodo/SciViews-K/.komodotools/Docs_-_Extensions.komodotool 2013-09-13 17:01:17 UTC (rev 530) @@ -8,7 +8,7 @@ ], "trigger": "", "rank": 100, - "version": "1.0.7", + "version": "1.0.11", "async": 1, "type": "macro", "icon": "chrome://fugue/skin/icons/information-white.png" Added: komodo/SciViews-K/.komodotools/Project/.DS_Store =================================================================== (Binary files differ) Property changes on: komodo/SciViews-K/.komodotools/Project/.DS_Store ___________________________________________________________________ Added: svn:mime-type + application/octet-stream Added: komodo/SciViews-K/.komodotools/Project/Build.komodotool =================================================================== --- komodo/SciViews-K/.komodotools/Project/Build.komodotool (rev 0) +++ komodo/SciViews-K/.komodotools/Project/Build.komodotool 2013-09-13 17:01:17 UTC (rev 530) @@ -0,0 +1,55 @@ +{ + "keyboard_shortcut": "", + "name": "Build", + "language": "JavaScript", + "trigger_enabled": "0", + "rank": "100", + "trigger": "trigger_postopen", + "value": [ + "/**", + " * Script to build an xpi, running koext build in the current project root.", + " */", + "", + "var project = ko.macros.current.project;", + "", + "var os = Components.classes['@activestate.com/koOs;1'].", + " getService(Components.interfaces.koIOs);", + "", + "var koSysUtils = Components.classes[\"@activestate.com/koSysUtils;1\"].", + " getService(Components.interfaces.koISysUtils);", + "", + "var appInfo = Components.classes[\"@mozilla.org/xre/app-info;1\"].", + " getService(Components.interfaces.nsIXULRuntime);", + "", + "var koDirs = Components.classes['@activestate.com/koDirs;1'].", + " getService(Components.interfaces.koIDirs);", + "", + "var pythonExe = koDirs.pythonExe;", + "var projectDir = ko.interpolate.interpolateStrings('%p');", + "var scriptName = 'koext';", + "", + "if (appInfo.OS == 'WINNT') {", + " scriptName += \".py\"; ", + "}", + "", + "var arr = [koDirs.sdkDir, 'bin', scriptName]", + "var app = os.path.joinlist(arr.length, arr);", + "var cmd = '\"'+pythonExe+'\" \"'+app+'\" build -d \"'+projectDir+'\"';", + "", + "if (appInfo.OS == 'WINNT') {", + " cmd = '\"' + cmd + '\"';", + "}", + "var cwd = koDirs.mozBinDir;", + "cmd += \" {'cwd': u'\"+cwd+\"'}\";", + "", + "ko.run.runEncodedCommand(window, cmd, function() {", + " ko.statusBar.AddMessage('Build complete', 'projects', 5000, true);", + " ko.projects.manager.saveProject(project);", + "});", + "" + ], + "version": "1.0.7", + "async": "0", + "type": "macro", + "icon": "chrome://famfamfamsilk/skin/icons/lightning_go.png" +} \ No newline at end of file Added: komodo/SciViews-K/.komodotools/Project/Configure.komodotool =================================================================== --- komodo/SciViews-K/.komodotools/Project/Configure.komodotool (rev 0) +++ komodo/SciViews-K/.komodotools/Project/Configure.komodotool 2013-09-13 17:01:17 UTC (rev 530) @@ -0,0 +1,77 @@ +{ + "keyboard_shortcut": "", + "name": "Configure", + "language": "JavaScript", + "trigger_enabled": "0", + "rank": "100", + "trigger": "trigger_postopen", + "value": [ + "try {", + "", + "var libPart = ko.projects.findPart('macro', 'extension_lib', 'container');", + "eval(libPart.value);", + "", + "var koExt = new extensionLib();", + "", + "var project = ko.macros.current.project;", + "", + "var setupWin = project.getChildByAttributeValue('name','setup.xul', 1);", + "var rdf = project.getChildByAttributeValue('name','install.rdf', 1);", + "var data = {};", + "", + "var prefset = project.prefset;", + "", + "if(prefset.hasPrefHere('configured')) {", + " var rdf_xml = koExt.readFile(rdf.getFile().URI);", + " data = {", + " 'valid': false,", + " 'configured': true,", + " 'vars': koExt.getRdfVars(rdf_xml)", + " };", + " data.vars['ext_name'] = koExt.getNiceName(data.vars.name);", + "} else { // init data", + " data = {", + " 'valid': false,", + " 'configured': false,", + " 'vars': {", + " 'id': '',", + " 'name': 'My Extension',", + " 'creator': 'Me',", + " 'version': '0.1',", + " 'description': '',", + " 'homepageURL': '',", + " 'ext_name': ''", + " }", + " };", + "}", + "", + "window.openDialog(", + " setupWin.getFile().URI,", + " \"_blank\",", + " \"centerscreen,chrome,resizable,scrollbars,dialog=no,close,modal=yes\",", + " data", + ");", + "", + "if(data.valid) {", + " if(koExt.updateProject(data.vars)) {", + " prefset.setBooleanPref('configured', true);", + " var part = project.getChildByAttributeValue('name', 'oncreate',1);", + " if(part) { part.name = 'Configure'; }", + " var msg = 'Extension Project '+data.vars.name+' configured!';", + " ko.statusBar.AddMessage(msg, 'project', 3000, true);", + " ko.projects.manager.saveProject(project);", + " } else {", + " alert('Error encountered: '+koExt.error+\"\\nConfiguration aborted.\");", + " }", + "}", + "", + "} catch(e) {", + " alert(e);", + "}", + "" + ], + "version": "1.0.7", + "async": "0", + "type": "macro", + "icon": "chrome://famfamfamsilk/skin/icons/wrench.png" +} \ No newline at end of file Added: komodo/SciViews-K/.komodotools/Project/extension_lib.komodotool =================================================================== --- komodo/SciViews-K/.komodotools/Project/extension_lib.komodotool (rev 0) +++ komodo/SciViews-K/.komodotools/Project/extension_lib.komodotool 2013-09-13 17:01:17 UTC (rev 530) @@ -0,0 +1,174 @@ +{ + "keyboard_shortcut": "", + "name": "extension_lib", + "language": "JavaScript", + "trigger_enabled": "0", + "rank": "100", + "trigger": "trigger_postopen", + "value": [ + "try {", + " ", + "var extensionLib = function() {", + " this.os = Components.classes['@activestate.com/koOs;1'].", + " getService(Components.interfaces.koIOs);", + " this.error = false;", + "}", + "", + "extensionLib.prototype.getPath = function(relative) {", + " try {", + " var prj_path = ko.interpolate.interpolateStrings('%p');", + " path = this.os.path.join(prj_path, relative);", + " return path;", + " } catch(e) {", + " alert(e+\"\\narg name: \"+name);", + " }", + "}", + "", + "extensionLib.prototype.readFile = function(filename) {", + " // read the template file", + " try {", + " var fileEx = Components.classes[\"@activestate.com/koFileEx;1\"]", + " .createInstance(Components.interfaces.koIFileEx);", + " fileEx.URI = filename;", + " fileEx.open('rb');", + " var content = fileEx.readfile();", + " fileEx.close();", + " return content;", + " } catch(e) {", + " alert(e+\"\\narg filename: \"+filename);", + " }", + "}", + "", + "extensionLib.prototype.writeFile = function(filename, content) {", + " try {", + " var fileEx = Components.classes[\"@activestate.com/koFileEx;1\"]", + " .createInstance(Components.interfaces.koIFileEx);", + " fileEx.URI = filename;", + " fileEx.open('wb+');", + " fileEx.puts(content);", + " fileEx.close();", + " } catch(e) {", + " alert(e+\"\\narg filename: \"+filename);", + " }", + "}", + "", + "extensionLib.prototype.getRdfVars = function(txt) {", + " try {", + " var Rx = /\\([\\S\\ ]+?)\\<\\//g;", + " var ext_vars = {};", + " while(results = Rx.exec(txt)) {", + " var idRx = /type|min|max|\\{/;", + " if(!idRx.test(results[0])) { // filter out stuff we don't want", + " ext_vars[results[1]] = results[2];", + " }", + " }", + " return ext_vars;", + " } catch(e) {", + " alert(e+\"\\narg rdf_path: \"+rdf_path);", + " }", + "}", + "", + "extensionLib.prototype.getManifestVars = function(txt) {", + " try {", + " var rx1 = /content ([\\S]+?) jar\\:([\\S]+?)\\.jar/g;", + " var res1 = rx1.exec(txt);", + " var rx2 = /chrome:\\/\\/([\\S]+?)\\/content\\/overlay\\.xul/g;", + " var res2 = rx2.exec(txt);", + " return new Array(res1[1], res1[2], res2[1]);", + " } catch(e) {", + " alert(e+\"\\narg path: \"+path);", + " }", + "}", + "", + "extensionLib.prototype.getOverlayVars = function(txt) {", + " try {", + " var rx1 = / default document = .R // If level < 3 => set reload documents // set coloration of variables in R format - // If level < 4 => do not load startu page + // If level < 4 => do not load startup page // Show line number => not before level 3 // Simplify Scintilla... must be done for each buffer Modified: komodo/SciViews-K/install.rdf =================================================================== --- komodo/SciViews-K/install.rdf 2013-03-18 15:47:27 UTC (rev 529) +++ komodo/SciViews-K/install.rdf 2013-09-13 17:01:17 UTC (rev 530) @@ -5,7 +5,7 @@ true sciviewsk at sciviews.org SciViews-K - 0.9.30 + 0.9.31 Edit R code with Komodo Philippe Grosjean Romain Francois @@ -18,7 +18,7 @@ {36E66FA0-F259-11D9-850E-000D935D3368} 5.0 - 7.* + 8.* @@ -26,7 +26,7 @@ {b1042fb5-9e9c-11db-b107-000d935d3368} 5.0 - 7.* + 8.* Modified: pkg/SciViews/DESCRIPTION =================================================================== --- pkg/SciViews/DESCRIPTION 2013-03-18 15:47:27 UTC (rev 529) +++ pkg/SciViews/DESCRIPTION 2013-09-13 17:01:17 UTC (rev 530) @@ -1,7 +1,7 @@ Package: SciViews Type: Package -Version: 0.9-10 -Date: 2012-12-18 +Version: 0.9-11 +Date: 2013-08-28 Title: SciViews GUI API - Main package Authors at R: c(person("Philippe", "Grosjean", role = c("aut", "cre"), email = "phgrosjean at sciviews.org")) Modified: pkg/SciViews/NAMESPACE =================================================================== --- pkg/SciViews/NAMESPACE 2013-03-18 15:47:27 UTC (rev 529) +++ pkg/SciViews/NAMESPACE 2013-09-13 17:01:17 UTC (rev 530) @@ -41,17 +41,15 @@ setEncoding, as.integerBase, as.intBase, - as.char, - is.char, rx, perl, is.rx, is.perl, useBytes, "useBytes<-", - path, - as.path, - is.path, + filePath, + as.filePath, + is.filePath, isDir, isFile, fileAccess, @@ -275,7 +273,7 @@ S3method(one, default) -S3method(print, path) +S3method(print, filePath) S3method(contours, default) Modified: pkg/SciViews/NEWS =================================================================== --- pkg/SciViews/NEWS 2013-03-18 15:47:27 UTC (rev 529) +++ pkg/SciViews/NEWS 2013-09-13 17:01:17 UTC (rev 530) @@ -1,5 +1,12 @@ = SciViews News +== SciViews version 0.9-11 + +* path object is renamed filePath to avoid a clash with a path object in grid + package. Related function path(), is.path(), as.path() are renamed accordingly + filePath(), is.filePath() and as.filePath(). The print method is also adapted. + + == SciViews version 0.9-10 * Import from data.table is eliminated. For now, `@:=` is the same as `@<-`. Modified: pkg/SciViews/R/correlation.R =================================================================== --- pkg/SciViews/R/correlation.R 2013-03-18 15:47:27 UTC (rev 529) +++ pkg/SciViews/R/correlation.R 2013-09-13 17:01:17 UTC (rev 530) @@ -19,7 +19,8 @@ mf$... <- NULL mf[[1L]] <- as.name("model.frame") mf <- eval.parent(mf) - if (stats:::.check_vars_numeric(mf)) + ## TODO: avoid this! + if (stats:::.check_vars_numeric(mf)) stop("Correlation applies only to numerical variables") mt <- attr(mf, "terms") attr(mt, "intercept") <- 0L @@ -45,7 +46,7 @@ method <- match.arg(method) ## Just call cor in stats package - res <- stats:::cor(x = x, y = y, use = use, method = method) + res <- stats::cor(x = x, y = y, use = use, method = method) ## We want to return a correlation matrix, even if there is one correlation if (length(res) == 1) { Modified: pkg/SciViews/R/file.R =================================================================== --- pkg/SciViews/R/file.R 2013-03-18 15:47:27 UTC (rev 529) +++ pkg/SciViews/R/file.R 2013-09-13 17:01:17 UTC (rev 530) @@ -3,18 +3,19 @@ ## TODO: Sys.setFileTime => fileTime, Sys.umask ## A replacement for file.path -path <- function (..., fsep = .Platform$file.sep) +filePath <- function (..., fsep = .Platform$file.sep) { - ## Create a path objects inheriting from character + ## Create a filePath objects inheriting from character return(structure(file.path(..., fsep = fsep), - class = c("path", "character"))) + class = c("filePath", "character"))) } ## The print function of filename separates dirs (ending with /) from files ## and also indicate which file already exists on disk or not -## EXPRERIMENTAL FEATURE... Should require an option to activate/inactivate +## EXPERIMENTAL FEATURE... Should require an option to activate/inactivate ## test of files on disk! -print.path <- function (x, ...) +## TODO: determine what is an alias or link! +print.filePath <- function (x, ...) { path <- as.character(x) path <- gsub("\\\\", "/", path) @@ -32,77 +33,77 @@ return(invisible(x)) } -as.path <- function (x, ...) - return(structure(as.character(x), class = c("path", "character"))) +as.filePath <- function (x, ...) + return(structure(as.character(x), class = c("filePath", "character"))) -is.path <- function (x) - return(inherits(x, "path")) +is.filePath <- function (x) + return(inherits(x, "filePath")) -isDir <- function (path) - return(file.info(path)$isdir) +isDir <- function (filePath) + return(file.info(filePath)$isdir) -isFile <- function (path) - return(file.exists(path) & !file.info(path)$isdir) +isFile <- function (filePath) + return(file.exists(filePath) & !file.info(filePath)$isdir) ## Rework paths ## basename -fileName <- function (path) - return(structure(basename(path), class = c("path", "character"))) +fileName <- function (filePath) + return(structure(basename(filePath), class = c("filePath", "character"))) ## dirname -fileDir <- function (path) - return(structure(dirname(path), class = c("path", "character"))) +fileDir <- function (filePath) + return(structure(dirname(filePath), class = c("filePath", "character"))) ## path.expand -fileExpand <- function (path) - return(structure(path.expand(path), class = c("path", "character"))) +fileExpand <- function (filePath) + return(structure(path.expand(filePath), class = c("filePath", "character"))) ## normalizePath -fileNormalize <- function (path, mustWork = FALSE) - return(structure(normalizePath(path, winslash = "/", mustWork = mustWork), - class = c("path", "character"))) +fileNormalize <- function (filePath, mustWork = FALSE) + return(structure(normalizePath(filePath, winslash = "/", mustWork = mustWork), + class = c("filePath", "character"))) ## Get various files or directories ## R.home dirR <- function (component = "home") - return(structure(R.home(component), class = c("path", "character"))) + return(structure(R.home(component), class = c("filePath", "character"))) ## TODO: find.package() and path.package() ## system.file TODO: case it returns ""! And should we use mustWork? filePackage <- function (..., package = "base", lib.loc = NULL, mustWork = FALSE) return(structure(system.file(..., package = package, lib.loc = lib.loc, - mustWork = mustWork), class = c("path", "character"))) + mustWork = mustWork), class = c("filePath", "character"))) ## tempdir dirTemp <- function () - return(structure(tempdir(), class = c("path", "character"))) + return(structure(tempdir(), class = c("filePath", "character"))) ## tempfile fileTemp <- function (pattern = "file", tmpdir = tempdir(), fileext = "") return(structure(tempfile(pattern = pattern, tmpdir = tmpdir, - fileext = fileext), class = c("path", "character"))) + fileext = fileext), class = c("filePath", "character"))) -## Sys.which, TODO: keep names and display them in print.path objects! +## Sys.which, TODO: keep names and display them in print.filePath objects! fileFind <- function (names) - return(structure(Sys.which(names), names = names, class = c("path", "character"))) + return(structure(Sys.which(names), names = names, class = c("filePath", "character"))) ## List dirs = dir() = list.dirs() -dirList <- function (path = ".", full.names = TRUE, recursive = TRUE) - return(structure(list.dirs(path = path, full.names = full.names, - recursive = recursive), class = c("path", "character"))) +dirList <- function (filePath = ".", full.names = TRUE, recursive = TRUE) + return(structure(list.dirs(path = filePath, full.names = full.names, + recursive = recursive), class = c("filePath", "character"))) ## List files = dir() and list.files() -fileList <- function (path = ".", pattern = NULL, all.files = FALSE, +fileList <- function (filePath = ".", pattern = NULL, all.files = FALSE, full.names = FALSE, recursive = FALSE, ignore.case = FALSE, include.dirs = FALSE) - return(structure(dir(path = path, pattern = pattern, all.files = all.files, + return(structure(dir(path = filePath, pattern = pattern, all.files = all.files, full.names = full.names, recursive = recursive, ignore.case = ignore.case, include.dirs = include.dirs), - class = c("path", "character"))) + class = c("filePath", "character"))) ## List files using wildcard expansion ('globbing') -fileListGlob <- function (path, dir.mark = FALSE) - return(structure(Sys.glob(paths = path, dirmark = dir.mark), - class = c("path", "character"))) +fileListGlob <- function (filePath, dir.mark = FALSE) + return(structure(Sys.glob(paths = filePath, dirmark = dir.mark), + class = c("filePath", "character"))) ## Various file manipulation functions that do not return a path object ## (just homogenize the name...) @@ -117,14 +118,14 @@ fileChmod <- .Recode(get("Sys.chmod", envir = baseenv())) fileRemove <- .Recode(get("file.remove", envir = baseenv())) ## This is "stronger" than fileRemove()! -fileDelete <- function (path, recursive = FALSE, force = FALSE) - return(unlink(x = path, recursive = recursive, force = force)) +fileDelete <- function (filePath, recursive = FALSE, force = FALSE) + return(unlink(x = filePath, recursive = recursive, force = force)) fileLink <- .Recode(get("file.link", envir = baseenv())) fileSymlink <- .Recode(get("file.symlink", envir = baseenv())) -fileReadLink <- function (path) - return(structure(Sys.readlink(paths = path), - class = c("path", "character"))) +fileReadLink <- function (filePath) + return(structure(Sys.readlink(paths = filePath), + class = c("filePath", "character"))) ## This is linked to some GUI element, possibly... anyway... fileShow <- .Recode(get("file.show", envir = baseenv())) @@ -136,7 +137,7 @@ { if (is.null(dir)) { dir <- getwd() - class(dir) <- c("path", "character") + class(dir) <- c("filePath", "character") ## Make sure to use /, even under Windows dir <- gsub("\\\\", "/", dir) return(dir) @@ -144,7 +145,7 @@ owdir <- setwd(dir) ## Make sure to use /, even under Windows owdir <- gsub("\\\\", "/", owdir) - class(owdir) <- c("path", "character") + class(owdir) <- c("filePath", "character") ## Save old working directory .assignTemp(".owdir", owdir) return(owdir) @@ -157,7 +158,7 @@ if (is.null(dir)) { dir <- getOption("R.initdir") if (is.null(dir)) return(NULL) - class(dir) <- c("path", "character") + class(dir) <- c("filePath", "character") ## Make sure to use /, even under Windows dir <- gsub("\\\\", "/", dir) return(dir) @@ -170,7 +171,7 @@ ## TODO: make everything we need to open the new session directory ## Make sure to use /, even under Windows osdir <- gsub("\\\\", "/", osdir) - class(osdir) <- c("path", "character") + class(osdir) <- c("filePath", "character") ## Save old session directory .assignTemp(".osdir", osdir) return(osdir) Modified: pkg/SciViews/R/pcomp.R =================================================================== --- pkg/SciViews/R/pcomp.R 2013-03-18 15:47:27 UTC (rev 529) +++ pkg/SciViews/R/pcomp.R 2013-09-13 17:01:17 UTC (rev 530) @@ -19,7 +19,8 @@ mf$... <- NULL mf[[1L]] <- as.name("model.frame") mf <- eval.parent(mf) - if (stats:::.check_vars_numeric(mf)) + ## TODO: avoid this! + if (stats:::.check_vars_numeric(mf)) stop("PCA applies only to numerical variables") na.act <- attr(mf, "na.action") mt <- attr(mf, "terms") @@ -209,6 +210,7 @@ if (missing(xlab)) xlab <- labs[choices[1]] else xlab if (missing(ylab)) ylab <- labs[choices[2]] else ylab switch(which, + ## TODO: avoid this! screeplot = stats:::screeplot.default(x, col = bar.col, main = main, ...), loadings = vectorplot(loadings(x), choices = choices, col = col, circle.col = circle.col, ar.length = ar.length, pos = pos, cex = cex, @@ -339,7 +341,8 @@ else lam <- 1 if (pc.biplot) lam <- lam/sqrt(n) - stats:::biplot.default(t(t(scores[, choices])/lam), + ## TODO: avoid this! + stats:::biplot.default(t(t(scores[, choices])/lam), t(t(x$loadings[, choices]) * lam), ...) return(invisible()) } Modified: pkg/SciViews/TODO =================================================================== --- pkg/SciViews/TODO 2013-03-18 15:47:27 UTC (rev 529) +++ pkg/SciViews/TODO 2013-09-13 17:01:17 UTC (rev 530) @@ -59,4 +59,70 @@ we use them... or better: use contextual arguments: svMisc::expr => can superseed expr tooltip but uses it, if there is no svMisc::expr tooltip! +* unlist() should really be S3 generic with unlist.default + unlist.factor being +the original unlist() function. Need also at least unlist.Date, unlist.POSIXct +and unlist.POSIXlt, although the first two treatmenbts are (unexpectendly) +already correct! + +* What about c.factor()??? C() applied to factor currently just produces +rubbish... But, we may break existing code! + +* unlist applies to a list of matrices or arrays or data frames of the same +shape, i.e., same objects types and same column names should really rbind() +items... but using rbind() is inefficient => need another solution. Also, this +should be called differently to unlist() to avoid breaking code, why not +lbind()??? + +* Generic method bare(object) to drop all attributes except the one required to +define a given object... perhaps onlyNames(object) that does the same as c(x), +but see ?c. + +* matrices of lists +l <- list(x = 1:10, y = 3:7, z = TRUE, w = "azza") +l +#! $x +#! [1] 1 2 3 4 5 6 7 8 9 10 +#! +#! $y +#! [1] 3 4 5 6 7 +#! +#! $z +#! [1] TRUE +#! +#! $w +#! [1] "azza" + +as.matrix(l) +#! [,1] +#! x Integer,10 +#! y Integer,5 +#! z TRUE +#! w "azza" + +(ml <- matrix(l, nrow = 2)) +#! [,1] [,2] +#! [1,] Integer,10 TRUE +#! [2,] Integer,5 "azza" + +l$x +#! [1] 1 2 3 4 5 6 7 8 9 10 + +ml$x +#! NULL + +names(ml) <- c("x", "y", "z", "w") +ml +#! [,1] [,2] +#! [1,] Integer,10 TRUE +#! [2,] Integer,5 "azza" +#! attr(,"names") +#! [1] "x" "y" "z" "w" +ml$x +#! [1] 1 2 3 4 5 6 7 8 9 10 + +Why not to keep names when transforming into a matrix, since it is also +considered as a vector... and it seems to work well!? + + + * Translation of this package (and what about the doc?). Modified: pkg/SciViews/man/SciViews-package.Rd =================================================================== --- pkg/SciViews/man/SciViews-package.Rd 2013-03-18 15:47:27 UTC (rev 529) +++ pkg/SciViews/man/SciViews-package.Rd 2013-09-13 17:01:17 UTC (rev 530) @@ -13,8 +13,8 @@ \tabular{ll}{ Package: \tab SciViews\cr Type: \tab Package\cr - Version: \tab 0.9-10\cr - Date: \tab 2012-12-18\cr + Version: \tab 0.9-11\cr + Date: \tab 2013-08-28\cr License: \tab GPL (>= 2)\cr LazyLoad: \tab yes\cr } Modified: pkg/svDialogs/inst/gui/RMenuLinux.txt =================================================================== --- pkg/svDialogs/inst/gui/RMenuLinux.txt 2013-03-18 15:47:27 UTC (rev 529) +++ pkg/svDialogs/inst/gui/RMenuLinux.txt 2013-09-13 17:01:17 UTC (rev 530) @@ -147,30 +147,30 @@ separator item=FAQ on R - cmd=R -e 'utils:::RShowDoc("R-FAQ")' + cmd=R -e 'utils::RShowDoc("R-FAQ")' submenu=_Manuals (in PDF) item=An introduction to R - cmd=R -e 'utils:::RShowDoc("R-intro")' + cmd=R -e 'utils::RShowDoc("R-intro")' item=R Reference Manual cmd=R -e 'system2(getOption("pdfviewer"), shQuote(file.path(R.home("doc"), "manual", "refman.pdf")), wait = FALSE)' item=R Data Import/Export - cmd=R -e 'utils:::RShowDoc("R-data")' + cmd=R -e 'utils::RShowDoc("R-data")' item=R Language Definition - cmd=R -e 'utils:::RShowDoc("R-lang")' + cmd=R -e 'utils::RShowDoc("R-lang")' item=Writing R Extensions - cmd=R -e 'utils:::RShowDoc("R-exts")' + cmd=R -e 'utils::RShowDoc("R-exts")' item=R Internals - cmd=R -e 'utils:::RShowDoc("R-ints")' + cmd=R -e 'utils::RShowDoc("R-ints")' item=R Installation and Administration - cmd=R -e 'utils:::RShowDoc("R-admin")' + cmd=R -e 'utils::RShowDoc("R-admin")' item=Sweave User cmd=R -e 'system2(getOption("pdfviewer"), shQuote(system.file("doc", "Sweave.pdf", package = "utils")), wait = FALSE)' Modified: pkg/svDoc/DESCRIPTION =================================================================== --- pkg/svDoc/DESCRIPTION 2013-03-18 15:47:27 UTC (rev 529) +++ pkg/svDoc/DESCRIPTION 2013-09-13 17:01:17 UTC (rev 530) @@ -1,7 +1,7 @@ Package: svDoc Type: Package -Version: 0.9-7 -Date: 2013-01-11 +Version: 0.9-8 +Date: 2013-08-22 Title: SciViews GUI API - svDoc functions Authors at R: c(person("Philippe", "Grosjean", role = c("aut", "cre"), email = "phgrosjean at sciviews.org")) Modified: pkg/svDoc/NEWS =================================================================== --- pkg/svDoc/NEWS 2013-03-18 15:47:27 UTC (rev 529) +++ pkg/svDoc/NEWS 2013-09-13 17:01:17 UTC (rev 530) @@ -1,5 +1,12 @@ = svDoc News +== Changes in svDoc 0.9-8 + [TRUNCATED] To get the complete diff run: svnlook diff /svnroot/sciviews -r 530