[Sciviews-commits] r404 - in komodo/SciViews-K-dev: . R content content/js content/pkgman defaults skin/images skin/images/flags udl
noreply at r-forge.r-project.org
noreply at r-forge.r-project.org
Tue Sep 20 11:37:38 CEST 2011
Author: prezez
Date: 2011-09-20 11:37:37 +0200 (Tue, 20 Sep 2011)
New Revision: 404
Added:
komodo/SciViews-K-dev/rclient-simple.py
komodo/SciViews-K-dev/skin/images/flags/
komodo/SciViews-K-dev/skin/images/flags/ad.gif
komodo/SciViews-K-dev/skin/images/flags/ae.gif
komodo/SciViews-K-dev/skin/images/flags/af.gif
komodo/SciViews-K-dev/skin/images/flags/ag.gif
komodo/SciViews-K-dev/skin/images/flags/ai.gif
komodo/SciViews-K-dev/skin/images/flags/al.gif
komodo/SciViews-K-dev/skin/images/flags/am.gif
komodo/SciViews-K-dev/skin/images/flags/an.gif
komodo/SciViews-K-dev/skin/images/flags/ao.gif
komodo/SciViews-K-dev/skin/images/flags/ar.gif
komodo/SciViews-K-dev/skin/images/flags/as.gif
komodo/SciViews-K-dev/skin/images/flags/at.gif
komodo/SciViews-K-dev/skin/images/flags/au.gif
komodo/SciViews-K-dev/skin/images/flags/aw.gif
komodo/SciViews-K-dev/skin/images/flags/ax.gif
komodo/SciViews-K-dev/skin/images/flags/az.gif
komodo/SciViews-K-dev/skin/images/flags/ba.gif
komodo/SciViews-K-dev/skin/images/flags/bb.gif
komodo/SciViews-K-dev/skin/images/flags/bd.gif
komodo/SciViews-K-dev/skin/images/flags/be.gif
komodo/SciViews-K-dev/skin/images/flags/bf.gif
komodo/SciViews-K-dev/skin/images/flags/bg.gif
komodo/SciViews-K-dev/skin/images/flags/bh.gif
komodo/SciViews-K-dev/skin/images/flags/bi.gif
komodo/SciViews-K-dev/skin/images/flags/bj.gif
komodo/SciViews-K-dev/skin/images/flags/bm.gif
komodo/SciViews-K-dev/skin/images/flags/bn.gif
komodo/SciViews-K-dev/skin/images/flags/bo.gif
komodo/SciViews-K-dev/skin/images/flags/br.gif
komodo/SciViews-K-dev/skin/images/flags/bs.gif
komodo/SciViews-K-dev/skin/images/flags/bt.gif
komodo/SciViews-K-dev/skin/images/flags/bv.gif
komodo/SciViews-K-dev/skin/images/flags/bw.gif
komodo/SciViews-K-dev/skin/images/flags/by.gif
komodo/SciViews-K-dev/skin/images/flags/bz.gif
komodo/SciViews-K-dev/skin/images/flags/ca.gif
komodo/SciViews-K-dev/skin/images/flags/cc.gif
komodo/SciViews-K-dev/skin/images/flags/cd.gif
komodo/SciViews-K-dev/skin/images/flags/cf.gif
komodo/SciViews-K-dev/skin/images/flags/cg.gif
komodo/SciViews-K-dev/skin/images/flags/ch.gif
komodo/SciViews-K-dev/skin/images/flags/ci.gif
komodo/SciViews-K-dev/skin/images/flags/ck.gif
komodo/SciViews-K-dev/skin/images/flags/cl.gif
komodo/SciViews-K-dev/skin/images/flags/cm.gif
komodo/SciViews-K-dev/skin/images/flags/cn.gif
komodo/SciViews-K-dev/skin/images/flags/co.gif
komodo/SciViews-K-dev/skin/images/flags/cr.gif
komodo/SciViews-K-dev/skin/images/flags/cs.gif
komodo/SciViews-K-dev/skin/images/flags/cu.gif
komodo/SciViews-K-dev/skin/images/flags/cv.gif
komodo/SciViews-K-dev/skin/images/flags/cx.gif
komodo/SciViews-K-dev/skin/images/flags/cy.gif
komodo/SciViews-K-dev/skin/images/flags/cz.gif
komodo/SciViews-K-dev/skin/images/flags/de.gif
komodo/SciViews-K-dev/skin/images/flags/dj.gif
komodo/SciViews-K-dev/skin/images/flags/dk.gif
komodo/SciViews-K-dev/skin/images/flags/dm.gif
komodo/SciViews-K-dev/skin/images/flags/do.gif
komodo/SciViews-K-dev/skin/images/flags/dz.gif
komodo/SciViews-K-dev/skin/images/flags/ec.gif
komodo/SciViews-K-dev/skin/images/flags/ee.gif
komodo/SciViews-K-dev/skin/images/flags/eg.gif
komodo/SciViews-K-dev/skin/images/flags/eh.gif
komodo/SciViews-K-dev/skin/images/flags/er.gif
komodo/SciViews-K-dev/skin/images/flags/es.gif
komodo/SciViews-K-dev/skin/images/flags/et.gif
komodo/SciViews-K-dev/skin/images/flags/fam.gif
komodo/SciViews-K-dev/skin/images/flags/fi.gif
komodo/SciViews-K-dev/skin/images/flags/fj.gif
komodo/SciViews-K-dev/skin/images/flags/fk.gif
komodo/SciViews-K-dev/skin/images/flags/fm.gif
komodo/SciViews-K-dev/skin/images/flags/fo.gif
komodo/SciViews-K-dev/skin/images/flags/fr.gif
komodo/SciViews-K-dev/skin/images/flags/ga.gif
komodo/SciViews-K-dev/skin/images/flags/gd.gif
komodo/SciViews-K-dev/skin/images/flags/ge.gif
komodo/SciViews-K-dev/skin/images/flags/gf.gif
komodo/SciViews-K-dev/skin/images/flags/gh.gif
komodo/SciViews-K-dev/skin/images/flags/gi.gif
komodo/SciViews-K-dev/skin/images/flags/gl.gif
komodo/SciViews-K-dev/skin/images/flags/gm.gif
komodo/SciViews-K-dev/skin/images/flags/gn.gif
komodo/SciViews-K-dev/skin/images/flags/gp.gif
komodo/SciViews-K-dev/skin/images/flags/gq.gif
komodo/SciViews-K-dev/skin/images/flags/gr.gif
komodo/SciViews-K-dev/skin/images/flags/gs.gif
komodo/SciViews-K-dev/skin/images/flags/gt.gif
komodo/SciViews-K-dev/skin/images/flags/gu.gif
komodo/SciViews-K-dev/skin/images/flags/gw.gif
komodo/SciViews-K-dev/skin/images/flags/gy.gif
komodo/SciViews-K-dev/skin/images/flags/hk.gif
komodo/SciViews-K-dev/skin/images/flags/hm.gif
komodo/SciViews-K-dev/skin/images/flags/hn.gif
komodo/SciViews-K-dev/skin/images/flags/hr.gif
komodo/SciViews-K-dev/skin/images/flags/ht.gif
komodo/SciViews-K-dev/skin/images/flags/hu.gif
komodo/SciViews-K-dev/skin/images/flags/id.gif
komodo/SciViews-K-dev/skin/images/flags/ie.gif
komodo/SciViews-K-dev/skin/images/flags/il.gif
komodo/SciViews-K-dev/skin/images/flags/in.gif
komodo/SciViews-K-dev/skin/images/flags/io.gif
komodo/SciViews-K-dev/skin/images/flags/iq.gif
komodo/SciViews-K-dev/skin/images/flags/ir.gif
komodo/SciViews-K-dev/skin/images/flags/is.gif
komodo/SciViews-K-dev/skin/images/flags/it.gif
komodo/SciViews-K-dev/skin/images/flags/jm.gif
komodo/SciViews-K-dev/skin/images/flags/jo.gif
komodo/SciViews-K-dev/skin/images/flags/jp.gif
komodo/SciViews-K-dev/skin/images/flags/ke.gif
komodo/SciViews-K-dev/skin/images/flags/kg.gif
komodo/SciViews-K-dev/skin/images/flags/kh.gif
komodo/SciViews-K-dev/skin/images/flags/ki.gif
komodo/SciViews-K-dev/skin/images/flags/km.gif
komodo/SciViews-K-dev/skin/images/flags/kn.gif
komodo/SciViews-K-dev/skin/images/flags/kp.gif
komodo/SciViews-K-dev/skin/images/flags/kr.gif
komodo/SciViews-K-dev/skin/images/flags/kw.gif
komodo/SciViews-K-dev/skin/images/flags/ky.gif
komodo/SciViews-K-dev/skin/images/flags/kz.gif
komodo/SciViews-K-dev/skin/images/flags/la.gif
komodo/SciViews-K-dev/skin/images/flags/lb.gif
komodo/SciViews-K-dev/skin/images/flags/lc.gif
komodo/SciViews-K-dev/skin/images/flags/li.gif
komodo/SciViews-K-dev/skin/images/flags/lk.gif
komodo/SciViews-K-dev/skin/images/flags/lr.gif
komodo/SciViews-K-dev/skin/images/flags/ls.gif
komodo/SciViews-K-dev/skin/images/flags/lt.gif
komodo/SciViews-K-dev/skin/images/flags/lu.gif
komodo/SciViews-K-dev/skin/images/flags/lv.gif
komodo/SciViews-K-dev/skin/images/flags/ly.gif
komodo/SciViews-K-dev/skin/images/flags/ma.gif
komodo/SciViews-K-dev/skin/images/flags/mc.gif
komodo/SciViews-K-dev/skin/images/flags/md.gif
komodo/SciViews-K-dev/skin/images/flags/me.gif
komodo/SciViews-K-dev/skin/images/flags/mg.gif
komodo/SciViews-K-dev/skin/images/flags/mh.gif
komodo/SciViews-K-dev/skin/images/flags/mk.gif
komodo/SciViews-K-dev/skin/images/flags/ml.gif
komodo/SciViews-K-dev/skin/images/flags/mm.gif
komodo/SciViews-K-dev/skin/images/flags/mn.gif
komodo/SciViews-K-dev/skin/images/flags/mo.gif
komodo/SciViews-K-dev/skin/images/flags/mp.gif
komodo/SciViews-K-dev/skin/images/flags/mq.gif
komodo/SciViews-K-dev/skin/images/flags/mr.gif
komodo/SciViews-K-dev/skin/images/flags/ms.gif
komodo/SciViews-K-dev/skin/images/flags/mt.gif
komodo/SciViews-K-dev/skin/images/flags/mu.gif
komodo/SciViews-K-dev/skin/images/flags/mv.gif
komodo/SciViews-K-dev/skin/images/flags/mw.gif
komodo/SciViews-K-dev/skin/images/flags/mx.gif
komodo/SciViews-K-dev/skin/images/flags/my.gif
komodo/SciViews-K-dev/skin/images/flags/mz.gif
komodo/SciViews-K-dev/skin/images/flags/na.gif
komodo/SciViews-K-dev/skin/images/flags/nc.gif
komodo/SciViews-K-dev/skin/images/flags/ne.gif
komodo/SciViews-K-dev/skin/images/flags/nf.gif
komodo/SciViews-K-dev/skin/images/flags/ng.gif
komodo/SciViews-K-dev/skin/images/flags/ni.gif
komodo/SciViews-K-dev/skin/images/flags/nl.gif
komodo/SciViews-K-dev/skin/images/flags/no.gif
komodo/SciViews-K-dev/skin/images/flags/np.gif
komodo/SciViews-K-dev/skin/images/flags/nr.gif
komodo/SciViews-K-dev/skin/images/flags/nu.gif
komodo/SciViews-K-dev/skin/images/flags/nz.gif
komodo/SciViews-K-dev/skin/images/flags/om.gif
komodo/SciViews-K-dev/skin/images/flags/pa.gif
komodo/SciViews-K-dev/skin/images/flags/pe.gif
komodo/SciViews-K-dev/skin/images/flags/pf.gif
komodo/SciViews-K-dev/skin/images/flags/pg.gif
komodo/SciViews-K-dev/skin/images/flags/ph.gif
komodo/SciViews-K-dev/skin/images/flags/pk.gif
komodo/SciViews-K-dev/skin/images/flags/pl.gif
komodo/SciViews-K-dev/skin/images/flags/pm.gif
komodo/SciViews-K-dev/skin/images/flags/pn.gif
komodo/SciViews-K-dev/skin/images/flags/pr.gif
komodo/SciViews-K-dev/skin/images/flags/ps.gif
komodo/SciViews-K-dev/skin/images/flags/pt.gif
komodo/SciViews-K-dev/skin/images/flags/pw.gif
komodo/SciViews-K-dev/skin/images/flags/py.gif
komodo/SciViews-K-dev/skin/images/flags/qa.gif
komodo/SciViews-K-dev/skin/images/flags/re.gif
komodo/SciViews-K-dev/skin/images/flags/ro.gif
komodo/SciViews-K-dev/skin/images/flags/rs.gif
komodo/SciViews-K-dev/skin/images/flags/ru.gif
komodo/SciViews-K-dev/skin/images/flags/rw.gif
komodo/SciViews-K-dev/skin/images/flags/sa.gif
komodo/SciViews-K-dev/skin/images/flags/sb.gif
komodo/SciViews-K-dev/skin/images/flags/sc.gif
komodo/SciViews-K-dev/skin/images/flags/sd.gif
komodo/SciViews-K-dev/skin/images/flags/se.gif
komodo/SciViews-K-dev/skin/images/flags/sg.gif
komodo/SciViews-K-dev/skin/images/flags/sh.gif
komodo/SciViews-K-dev/skin/images/flags/si.gif
komodo/SciViews-K-dev/skin/images/flags/sj.gif
komodo/SciViews-K-dev/skin/images/flags/sk.gif
komodo/SciViews-K-dev/skin/images/flags/sl.gif
komodo/SciViews-K-dev/skin/images/flags/sm.gif
komodo/SciViews-K-dev/skin/images/flags/sn.gif
komodo/SciViews-K-dev/skin/images/flags/so.gif
komodo/SciViews-K-dev/skin/images/flags/sr.gif
komodo/SciViews-K-dev/skin/images/flags/st.gif
komodo/SciViews-K-dev/skin/images/flags/sv.gif
komodo/SciViews-K-dev/skin/images/flags/sy.gif
komodo/SciViews-K-dev/skin/images/flags/sz.gif
komodo/SciViews-K-dev/skin/images/flags/tc.gif
komodo/SciViews-K-dev/skin/images/flags/td.gif
komodo/SciViews-K-dev/skin/images/flags/tf.gif
komodo/SciViews-K-dev/skin/images/flags/tg.gif
komodo/SciViews-K-dev/skin/images/flags/th.gif
komodo/SciViews-K-dev/skin/images/flags/tj.gif
komodo/SciViews-K-dev/skin/images/flags/tk.gif
komodo/SciViews-K-dev/skin/images/flags/tl.gif
komodo/SciViews-K-dev/skin/images/flags/tm.gif
komodo/SciViews-K-dev/skin/images/flags/tn.gif
komodo/SciViews-K-dev/skin/images/flags/to.gif
komodo/SciViews-K-dev/skin/images/flags/tr.gif
komodo/SciViews-K-dev/skin/images/flags/tt.gif
komodo/SciViews-K-dev/skin/images/flags/tv.gif
komodo/SciViews-K-dev/skin/images/flags/tw.gif
komodo/SciViews-K-dev/skin/images/flags/tz.gif
komodo/SciViews-K-dev/skin/images/flags/ua.gif
komodo/SciViews-K-dev/skin/images/flags/ug.gif
komodo/SciViews-K-dev/skin/images/flags/uk.gif
komodo/SciViews-K-dev/skin/images/flags/um.gif
komodo/SciViews-K-dev/skin/images/flags/us.gif
komodo/SciViews-K-dev/skin/images/flags/uy.gif
komodo/SciViews-K-dev/skin/images/flags/uz.gif
komodo/SciViews-K-dev/skin/images/flags/va.gif
komodo/SciViews-K-dev/skin/images/flags/vc.gif
komodo/SciViews-K-dev/skin/images/flags/ve.gif
komodo/SciViews-K-dev/skin/images/flags/vg.gif
komodo/SciViews-K-dev/skin/images/flags/vi.gif
komodo/SciViews-K-dev/skin/images/flags/vn.gif
komodo/SciViews-K-dev/skin/images/flags/vu.gif
komodo/SciViews-K-dev/skin/images/flags/wf.gif
komodo/SciViews-K-dev/skin/images/flags/ws.gif
komodo/SciViews-K-dev/skin/images/flags/ye.gif
komodo/SciViews-K-dev/skin/images/flags/yt.gif
komodo/SciViews-K-dev/skin/images/flags/za.gif
komodo/SciViews-K-dev/skin/images/flags/zm.gif
komodo/SciViews-K-dev/skin/images/flags/zw.gif
Removed:
komodo/SciViews-K-dev/defaults/.Rprofile
komodo/SciViews-K-dev/defaults/pkgMan.R
komodo/SciViews-K-dev/defaults/print.help_files_with_topic210.R
komodo/SciViews-K-dev/defaults/print.help_files_with_topic211.R
komodo/SciViews-K-dev/defaults/svMisc_0.9-61.tar.gz
komodo/SciViews-K-dev/defaults/svMisc_0.9-61.zip
komodo/SciViews-K-dev/defaults/svSocket_0.9-48.tar.gz
komodo/SciViews-K-dev/defaults/svSocket_0.9-48.zip
komodo/SciViews-K-dev/defaults/svStart.R
komodo/SciViews-K-dev/udl/Rlex.udl
Modified:
komodo/SciViews-K-dev/R/pkgman.R
komodo/SciViews-K-dev/content/js/pref-R.js
komodo/SciViews-K-dev/content/pkgman/pkgman.xul
komodo/SciViews-K-dev/content/pref-R.xul
komodo/SciViews-K-dev/install.rdf
komodo/SciViews-K-dev/sciviewsk-1.0.6dev-ko.xpi
komodo/SciViews-K-dev/udl/R-mainlex.udl
Log:
SciViews-K-dev:
package manager: country flag icons for the CRAN mirror list
preferences: 'Miscellanous' section is hidden (not needed now), R starting directory was incorrectly set to 'defaults', rather than 'R'
updated xpi
tidied up old files
Modified: komodo/SciViews-K-dev/R/pkgman.R
===================================================================
--- komodo/SciViews-K-dev/R/pkgman.R 2011-09-20 08:44:38 UTC (rev 403)
+++ komodo/SciViews-K-dev/R/pkgman.R 2011-09-20 09:37:37 UTC (rev 404)
@@ -41,9 +41,11 @@
mirrors <- getCRANmirrors()
assignTemp(tmpVar, mirrors)
}
- write.table(mirrors[, c(1,4)], row.names = FALSE, col.names = F, sep=';', quote = F, na="")
+ write.table(mirrors[, c("Name", "URL", "CountryCode")],
+ row.names = FALSE, col.names = F, sep=';', quote = F, na="")
}
+
pkgManGetAvailable <- function(page = "next", pattern = "", ilen=50,
col=c("Package", "Version", "InstalledVersion", "Status"),
reload=FALSE, sep=';', eol="\t\n") {
@@ -186,4 +188,3 @@
})
}, simplify = FALSE)
}
-
Modified: komodo/SciViews-K-dev/content/js/pref-R.js
===================================================================
--- komodo/SciViews-K-dev/content/js/pref-R.js 2011-09-20 08:44:38 UTC (rev 403)
+++ komodo/SciViews-K-dev/content/js/pref-R.js 2011-09-20 09:37:37 UTC (rev 404)
@@ -317,7 +317,7 @@
args1 += " --svStartPkgs=SciViews,MASS,ellipse";
var cwd = sv.tools.file.path("ProfD", "extensions",
- "sciviewsk at sciviews.org", "defaults");
+ "sciviewsk at sciviews.org", "R");
cmdArgs = cmdArgs.replace(/\s*--[sm]di\b/, "");
Modified: komodo/SciViews-K-dev/content/pkgman/pkgman.xul
===================================================================
--- komodo/SciViews-K-dev/content/pkgman/pkgman.xul 2011-09-20 08:44:38 UTC (rev 403)
+++ komodo/SciViews-K-dev/content/pkgman/pkgman.xul 2011-09-20 09:37:37 UTC (rev 404)
@@ -69,7 +69,6 @@
sv.r.evalCallback(cmd, updateInfo, "loaded");
}
-
function updateInfo(res, what) {
// add to installed / reload installed
// update items in Available
@@ -169,7 +168,8 @@
function setCranMirror(url) {
if(!url) url = sv.pref.getPref("CRANMirror").trim();
sv.rconn.evalAtOnce("pkgManSetCRANMirror(\"" + url + "\")");
- document.getElementById('selectedCranMirror').value = url;
+ var selectedCranMirror = document.getElementById('selectedCranMirror');
+ if(selectedCranMirror) selectedCranMirror.value = url;
}
function getCranMirrors() {
@@ -184,9 +184,12 @@
row.setAttribute('value', l[1]);
var cell = document.createElement('listcell');
cell.setAttribute('label', l[0]);
+ cell.setAttribute('image', "chrome://sciviewsk/skin/images/flags/" + l[2] + ".gif");
+ cell.className = "listcell-iconic";
+
row.appendChild(cell);
cell = document.createElement('listcell');
- cell.setAttribute('label', l[1] );
+ cell.setAttribute('label', l[1]);
row.appendChild(cell);
if(l[1].indexOf(mirror) > -1) sel = i;
rl.appendChild(row);
@@ -211,7 +214,6 @@
}
-
function getInstalledPkgs() {
var lines = sv.rconn.evalAtOnce('pkgManGetInstalled()').trim();
if (lines == 'NULL') return;
@@ -309,7 +311,6 @@
function pkgMgrOnLoad(event) {
-
var p = parent;
while (p = p.opener) {
if (p.ko) {
Modified: komodo/SciViews-K-dev/content/pref-R.xul
===================================================================
--- komodo/SciViews-K-dev/content/pref-R.xul 2011-09-20 08:44:38 UTC (rev 403)
+++ komodo/SciViews-K-dev/content/pref-R.xul 2011-09-20 09:37:37 UTC (rev 404)
@@ -152,11 +152,11 @@
</vbox>
</groupbox>
- <groupbox orient="vertical" align="left">
+ <groupbox orient="vertical" align="left" hidden="true">
<caption label="Miscellanous"/>
<label value="Startup packages"/>
-<!-- KB: Some users (including me) might not want having lots of unnecessary packages loaded at startup -->
+ <!--KB: Some users (including me) might not want having lots of unnecessary packages loaded at startup -->
<vbox align="left">
<description>
"SciViews-K" needs packages "svGUI", "svSocket"
@@ -184,8 +184,8 @@
<hbox align="center" hidden="true">
<checkbox id="sciviews.r.auto-start" disabled="true" label="Start R automatically"
pref="false" />
- </hbox>
- </groupbox>
+ </hbox>
+</groupbox>
<hbox>
<button label="Show advanced settings (rarely need to be changed)"
Deleted: komodo/SciViews-K-dev/defaults/.Rprofile
===================================================================
--- komodo/SciViews-K-dev/defaults/.Rprofile 2011-09-20 08:44:38 UTC (rev 403)
+++ komodo/SciViews-K-dev/defaults/.Rprofile 2011-09-20 09:37:37 UTC (rev 404)
@@ -1,2 +0,0 @@
-source("svStart.R")
-svStart()
Deleted: komodo/SciViews-K-dev/defaults/pkgMan.R
===================================================================
--- komodo/SciViews-K-dev/defaults/pkgMan.R 2011-09-20 08:44:38 UTC (rev 403)
+++ komodo/SciViews-K-dev/defaults/pkgMan.R 2011-09-20 09:37:37 UTC (rev 404)
@@ -1,30 +0,0 @@
-# R-Package manager helper functions
-# These possibly should be included in svMisc in future
-
-assignTemp("pkgManList", function(eol = "\n\n\n") {
- svtmp.ipkg <- as.data.frame(installed.packages(fields = c("Description"))
- [, c("Package", "Version", "Description", "Depends")])
-
- svtmp.ipkg$Loaded <- svtmp.ipkg$Package %in% .packages()
-
- if (!exists(".required"))
- .required <- logical(0)
-
- svtmp.ipkg$Required <- svtmp.ipkg$Package %in% .required
-
- print(write.table(svtmp.ipkg [, c("Package", "Version", "Description",
- "Loaded", "Required", "Depends")], eol="\n\n",
- na = "", sep="\t", quote=FALSE, row.names = FALSE,
- col.names = FALSE))
- invisible(NULL)
-})
-
-assignTemp("pkgManUpdatePkgs", function (lib.loc = .libPaths(), repos = getOption("repos"),
- contriburl = contrib.url(repos, type), method,
- available = available.packages(contriburl = contriburl, method = method),
- instlib = update[, "LibPath"], ...,
- checkBuilt = FALSE, type = getOption("pkgType")) {
- oldPkgs <- old.packages(lib.loc = lib.loc, contriburl = contriburl,
- method = method, available = available, checkBuilt = checkBuilt);
- return(oldPkgs)
-})
Deleted: komodo/SciViews-K-dev/defaults/print.help_files_with_topic210.R
===================================================================
--- komodo/SciViews-K-dev/defaults/print.help_files_with_topic210.R 2011-09-20 08:44:38 UTC (rev 403)
+++ komodo/SciViews-K-dev/defaults/print.help_files_with_topic210.R 2011-09-20 09:37:37 UTC (rev 404)
@@ -1,184 +0,0 @@
-# print method of object returned by help() is very unflexible for R.app and
-# does not allow in any way to use anything else than the R.app internal
-# browser for help!!!
-# That makes me very unhappy! Hey guys, I would like to use SciViews help
-# browser here! So, no other solution than to be even harsher, and to force
-# rewriting of the print function in base environment!!!
-# (problem emailed to Simon Urbanek on 03/11/2009... I hope he will propose
-# a work-around for this in R 2.11!!!)
-unlockBinding("print.help_files_with_topic", env = baseenv())
-assign("print.help_files_with_topic",
-function (x, ...)
-{
- browser <- getOption("browser")
- topic <- attr(x, "topic")
- type <- attr(x, "type")
- # This is the problematic code!
- #if (.Platform$GUI == "AQUA" && type == "html") {
- # browser <- function(x, ...) {
- # .Internal(aqua.custom.print("help-files", x))
- # return(invisible(x))
- # }
- #}
- paths <- as.character(x)
- if (!length(paths)) {
- writeLines(c(gettextf("No documentation for '%s' in specified packages and libraries:",
- topic), gettextf("you could try '??%s'", topic)))
- return(invisible(x))
- }
- if (type == "html")
- if (tools:::httpdPort == 0L)
- tools::startDynamicHelp()
- if (attr(x, "tried_all_packages")) {
- paths <- unique(dirname(dirname(paths)))
- msg <- gettextf("Help for topic '%s' is not in any loaded package but can be found in the following packages:",
- topic)
- if (type == "html" && tools:::httpdPort > 0L) {
- path <- file.path(tempdir(), ".R/doc/html")
- dir.create(path, recursive = TRUE, showWarnings = FALSE)
- out <- paste("<!DOCTYPE html PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\">\n",
- "<html><head><title>R: help</title>\n", "<meta http-equiv=\"Content-Type\" content=\"text/html; charset=\"UTF-8\">\n",
- "<link rel=\"stylesheet\" type=\"text/css\" href=\"/doc/html/R.css\">\n",
- "</head><body>\n\n<hr>\n", sep = "")
- out <- c(out, "<p>", msg, "</p><br>")
- out <- c(out, "<table width=\"100%\" summary=\"R Package list\">\n",
- "<tr align=\"left\" valign=\"top\">\n", "<td width=\"25%\">Package</td><td>Library</td></tr>\n")
- pkgs <- basename(paths)
- links <- paste("<a href=\"http://127.0.0.1:", tools:::httpdPort,
- "/library/", pkgs, "/help/", topic, "\">", pkgs,
- "</a>", sep = "")
- out <- c(out, paste("<tr align=\"left\" valign=\"top\">\n",
- "<td>", links, "</td><td>", dirname(paths), "</td></tr>\n",
- sep = ""))
- out <- c(out, "</table>\n</p>\n<hr>\n</body></html>")
- writeLines(out, file.path(path, "all.available.html"))
- browseURL(paste("http://127.0.0.1:", tools:::httpdPort,
- "/doc/html/all.available.html", sep = ""), browser)
- }
- else {
- writeLines(c(strwrap(msg), "", paste(" ", formatDL(c(gettext("Package"),
- basename(paths)), c(gettext("Library"), dirname(paths)),
- indent = 22))))
- }
- }
- else {
- if (length(paths) > 1L) {
- if (type == "html" && tools:::httpdPort > 0L) {
- browseURL(paste("http://127.0.0.1:", tools:::httpdPort,
- "/library/NULL/help/", topic, sep = ""), browser)
- return(invisible(x))
- }
- file <- paths[1L]
- p <- paths
- msg <- gettextf("Help on topic '%s' was found in the following packages:",
- topic)
- paths <- dirname(dirname(paths))
- txt <- formatDL(c("Package", basename(paths)), c("Library",
- dirname(paths)), indent = 22L)
- writeLines(c(strwrap(msg), "", paste(" ", txt), ""))
- if (interactive()) {
- fp <- file.path(paths, "Meta", "Rd.rds")
- tp <- basename(p)
- titles <- tp
- if (type == "html" || type == "latex")
- tp <- tools::file_path_sans_ext(tp)
- for (i in seq_along(fp)) {
- tmp <- try(.readRDS(fp[i]))
- titles[i] <- if (inherits(tmp, "try-error"))
- "unknown title"
- else tmp[tools::file_path_sans_ext(tmp$File) ==
- tp[i], "Title"]
- }
- txt <- paste(titles, " {", basename(paths), "}",
- sep = "")
- res <- menu(txt, title = gettext("Choose one"),
- graphics = getOption("menu.graphics"))
- if (res > 0)
- file <- p[res]
- }
- else {
- writeLines(gettext("\nUsing the first match ..."))
- }
- }
- else file <- paths
- if (type == "html") {
- if (tools:::httpdPort > 0L) {
- path <- dirname(file)
- dirpath <- dirname(path)
- pkgname <- basename(dirpath)
- browseURL(paste("http://127.0.0.1:", tools:::httpdPort,
- "/library/", pkgname, "/html/", basename(file),
- sep = ""), browser)
- }
- else {
- warning("HTML help is unavailable", call. = FALSE)
- att <- attributes(x)
- xx <- sub("/html/([^/]*)\\.html$", "/help/\\1",
- x)
- attributes(xx) <- att
- attr(xx, "type") <- "text"
- print(xx)
- }
- }
- else if (type == "text") {
- path <- dirname(file)
- dirpath <- dirname(path)
- pkgname <- basename(dirpath)
- RdDB <- file.path(path, pkgname)
- if (file.exists(paste(RdDB, "rdx", sep = "."))) {
- temp <- tools::Rd2txt(tools:::fetchRdDB(RdDB,
- basename(file)), out = tempfile("Rtxt"), package = pkgname)
- file.show(temp, title = gettextf("R Help on '%s'",
- topic), delete.file = TRUE)
- }
- else {
- zfile <- zip.file.extract(file, "Rhelp.zip")
- if (file.exists(zfile)) {
- first <- readLines(zfile, n = 1L)
- enc <- if (length(grep("\\(.*\\)$", first)))
- sub("[^(]*\\((.*)\\)$", "\\1", first)
- else ""
- if (enc == "utf8")
- enc <- "UTF-8"
- if (.Platform$OS.type == "windows"
- && enc == ""
- && l10n_info()$codepage < 1000)
- enc <- "CP1252"
- file.show(zfile, title = gettextf("R Help on '%s'",
- topic), delete.file = (zfile != file), encoding = enc)
- }
- else stop(gettextf("No text help for '%s' is available:\ncorresponding file is missing",
- topic), domain = NA)
- }
- }
- else if (type %in% c("ps", "postscript", "pdf")) {
- ok <- FALSE
- zfile <- zip.file.extract(file, "Rhelp.zip")
- if (zfile != file)
- on.exit(unlink(zfile))
- if (file.exists(zfile)) {
- .show_help_on_topic_offline(zfile, topic, type)
- ok <- TRUE
- }
- else {
- path <- dirname(file)
- dirpath <- dirname(path)
- pkgname <- basename(dirpath)
- RdDB <- file.path(dirpath, "help", pkgname)
- if (file.exists(paste(RdDB, "rdx", sep = "."))) {
- key <- sub("\\.tex$", "", basename(file))
- tf2 <- tempfile("Rlatex")
- tools::Rd2latex(tools:::fetchRdDB(RdDB, key),
- tf2)
- .show_help_on_topic_offline(tf2, topic, type)
- ok <- TRUE
- }
- }
- if (!ok)
- stop(gettextf("No offline help for '%s' is available:\ncorresponding file is missing",
- topic), domain = NA)
- }
- }
- invisible(x)
-}, envir = baseenv())
-lockBinding("print.help_files_with_topic", env = baseenv())
\ No newline at end of file
Deleted: komodo/SciViews-K-dev/defaults/print.help_files_with_topic211.R
===================================================================
--- komodo/SciViews-K-dev/defaults/print.help_files_with_topic211.R 2011-09-20 08:44:38 UTC (rev 403)
+++ komodo/SciViews-K-dev/defaults/print.help_files_with_topic211.R 2011-09-20 09:37:37 UTC (rev 404)
@@ -1,139 +0,0 @@
-# print method of object returned by help() is very unflexible for R.app and
-# does not allow in any way to use anything else than the R.app internal
-# browser for help!!!
-# That makes me very unhappy! Hey guys, I would like to use SciViews help
-# browser here! So, no other solution than to be even harsher, and to force
-# rewriting of the print function in base environment!!!
-# (problem emailed to Simon Urbanek on 03/11/2009... I hope he will propose
-# a work-around for this in R 2.12!!!)
-unlockBinding("print.help_files_with_topic", env = baseenv())
-assign("print.help_files_with_topic",
-function (x, ...)
-{
- browser <- getOption("browser")
- topic <- attr(x, "topic")
- type <- attr(x, "type")
- # This is the problematic code!
- #if (.Platform$GUI == "AQUA" && type == "html") {
- # browser <- function(x, ...) {
- # .Internal(aqua.custom.print("help-files", x))
- # return(invisible(x))
- # }
- #}
- paths <- as.character(x)
- if (!length(paths)) {
- writeLines(c(gettextf("No documentation for '%s' in specified packages and libraries:",
- topic), gettextf("you could try '??%s'", topic)))
- return(invisible(x))
- }
- if (type == "html")
- if (tools:::httpdPort == 0L)
- tools::startDynamicHelp()
- if (attr(x, "tried_all_packages")) {
- paths <- unique(dirname(dirname(paths)))
- msg <- gettextf("Help for topic '%s' is not in any loaded package but can be found in the following packages:",
- topic)
- if (type == "html" && tools:::httpdPort > 0L) {
- path <- file.path(tempdir(), ".R/doc/html")
- dir.create(path, recursive = TRUE, showWarnings = FALSE)
- out <- paste("<!DOCTYPE html PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\">\n",
- "<html><head><title>R: help</title>\n", "<meta http-equiv=\"Content-Type\" content=\"text/html; charset=\"UTF-8\">\n",
- "<link rel=\"stylesheet\" type=\"text/css\" href=\"/doc/html/R.css\">\n",
- "</head><body>\n\n<hr>\n", sep = "")
- out <- c(out, "<p>", msg, "</p><br>")
- out <- c(out, "<table width=\"100%\" summary=\"R Package list\">\n",
- "<tr align=\"left\" valign=\"top\">\n", "<td width=\"25%\">Package</td><td>Library</td></tr>\n")
- pkgs <- basename(paths)
- links <- paste("<a href=\"http://127.0.0.1:", tools:::httpdPort,
- "/library/", pkgs, "/help/", topic, "\">", pkgs,
- "</a>", sep = "")
- out <- c(out, paste("<tr align=\"left\" valign=\"top\">\n",
- "<td>", links, "</td><td>", dirname(paths), "</td></tr>\n",
- sep = ""))
- out <- c(out, "</table>\n</p>\n<hr>\n</body></html>")
- writeLines(out, file.path(path, "all.available.html"))
- browseURL(paste("http://127.0.0.1:", tools:::httpdPort,
- "/doc/html/all.available.html", sep = ""), browser)
- }
- else {
- writeLines(c(strwrap(msg), "", paste(" ", formatDL(c(gettext("Package"),
- basename(paths)), c(gettext("Library"), dirname(paths)),
- indent = 22))))
- }
- }
- else {
- if (length(paths) > 1L) {
- if (type == "html" && tools:::httpdPort > 0L) {
- browseURL(paste("http://127.0.0.1:", tools:::httpdPort,
- "/library/NULL/help/", topic, sep = ""), browser)
- return(invisible(x))
- }
- file <- paths[1L]
- p <- paths
- msg <- gettextf("Help on topic '%s' was found in the following packages:",
- topic)
- paths <- dirname(dirname(paths))
- txt <- formatDL(c("Package", basename(paths)), c("Library",
- dirname(paths)), indent = 22L)
- writeLines(c(strwrap(msg), "", paste(" ", txt), ""))
- if (interactive()) {
- fp <- file.path(paths, "Meta", "Rd.rds")
- tp <- basename(p)
- titles <- tp
- if (type == "html" || type == "latex")
- tp <- tools::file_path_sans_ext(tp)
- for (i in seq_along(fp)) {
- tmp <- try(.readRDS(fp[i]))
- titles[i] <- if (inherits(tmp, "try-error"))
- "unknown title"
- else tmp[tools::file_path_sans_ext(tmp$File) ==
- tp[i], "Title"]
- }
- txt <- paste(titles, " {", basename(paths), "}",
- sep = "")
- res <- menu(txt, title = gettext("Choose one"),
- graphics = getOption("menu.graphics"))
- if (res > 0)
- file <- p[res]
- }
- else {
- writeLines(gettext("\nUsing the first match ..."))
- }
- }
- else file <- paths
- if (type == "html") {
- if (tools:::httpdPort > 0L) {
- path <- dirname(file)
- dirpath <- dirname(path)
- pkgname <- basename(dirpath)
- browseURL(paste("http://127.0.0.1:", tools:::httpdPort,
- "/library/", pkgname, "/html/", basename(file),
- ".html", sep = ""), browser)
- }
- else {
- warning("HTML help is unavailable", call. = FALSE)
- att <- attributes(x)
- xx <- sub("/html/([^/]*)\\.html$", "/help/\\1",
- x)
- attributes(xx) <- att
- attr(xx, "type") <- "text"
- print(xx)
- }
- }
- else if (type == "text") {
- pkgname <- basename(dirname(dirname(file)))
- temp <- tools::Rd2txt(.getHelpFile(file), out = tempfile("Rtxt"),
- package = pkgname)
- file.show(temp, title = gettextf("R Help on '%s'",
- topic), delete.file = TRUE)
- }
- else if (type %in% c("ps", "postscript", "pdf")) {
- tf2 <- tempfile("Rlatex")
- tools::Rd2latex(.getHelpFile(file), tf2)
- .show_help_on_topic_offline(tf2, topic, type)
- unlink(tf2)
- }
- }
- invisible(x)
-}, envir = baseenv())
-lockBinding("print.help_files_with_topic", env = baseenv())
\ No newline at end of file
Deleted: komodo/SciViews-K-dev/defaults/svMisc_0.9-61.tar.gz
===================================================================
(Binary files differ)
Deleted: komodo/SciViews-K-dev/defaults/svMisc_0.9-61.zip
===================================================================
(Binary files differ)
Deleted: komodo/SciViews-K-dev/defaults/svSocket_0.9-48.tar.gz
===================================================================
(Binary files differ)
Deleted: komodo/SciViews-K-dev/defaults/svSocket_0.9-48.zip
===================================================================
(Binary files differ)
Deleted: komodo/SciViews-K-dev/defaults/svStart.R
===================================================================
--- komodo/SciViews-K-dev/defaults/svStart.R 2011-09-20 08:44:38 UTC (rev 403)
+++ komodo/SciViews-K-dev/defaults/svStart.R 2011-09-20 09:37:37 UTC (rev 404)
@@ -1,640 +0,0 @@
-### SciViews install begin ###
-## SciViews-R installation and startup for running R with Komodo/SciViews-K
-## Version 0.9.11, 2010-02-09 Ph. Grosjean (phgrosjean at sciviews.org)
-## Version 0.9.15, 2010-05-01 mod by K. Barton
-## Version 0.9.19, 2010-10-03 mod by Ph. Grosjean
-## Version 0.9.20, 2010-11-10 mod by K. Barton
-
-## TODO: also use value in koDebug to debug server from within R!
-
-`svStart` <-
-function (minRVersion = "2.11.1", minVersion = NA,
-## NOTE: minVersion is now also used as a list of required packages
-remote.repos = "http://R-Forge.R-project.org",
-pkg.dir = ".",
-debug = Sys.getenv("koDebug") == "TRUE",
-pkgsLast = c("svGUI", "ellipse", "MASS", "SciViews"), # to be loaded at the end
-pkgsDontLoad = c("codetools", "svTools"),
-skip = NULL)
-{
- # Note (KB): it would make life a way easier to put all (and only)
- # the necessary routines in a SINGLE package.
-
- ## Needed later for tryCatch'ing:
- err.null <- function (e) NULL
- silentEval <- function (expr, error=function(e)NULL, warning=function(e)NULL)
- tryCatch(expr, error=error, warning=warning)
-
- port <- as.numeric(getOption("ko.serve"))
-
- ## If minVersion is not provided, get it from packages in 'default' directory
- pkg.extpat <- switch(.Platform$pkgType, win.binary = "zip", "tar\\.gz")
- pkgFiles <- dir(pkg.dir, pattern = paste("^.*_[0-9\\.\\-]+\\.", pkg.extpat,
- "$", sep=""))
- if (all(is.na(minVersion))) {
- minVersion <- structure(gsub(sprintf("(^[a-zA-Z]+_|\\.%s$)",
- pkg.extpat), "", pkgFiles), names = gsub("_.*$", "", pkgFiles))
-
- minVersion <- package_version(gsub(sprintf("(^[a-zA-Z]+_|\\.%s$)",
- pkg.extpat), "", pkgFiles))
-
- pkgNames <- gsub("_.*$", "", pkgFiles)
- ## Select newest version if more then one exist
- v <- tapply(minVersion, pkgNames, max)
- minVersion <- as.character(structure(v, class = class(minVersion)))
- names(minVersion) <- names(v)
- }
- pkgs <- names(minVersion)
-
- i.skip <- !(pkgs %in% skip)
- pkgs <- pkgs[i.skip]
- minVersion <- minVersion[i.skip]
- pkgFiles <- pkgFiles[i.skip]
-
- # Needed because of dependency errors during a fresh installation...
- pkgs <- pkgs[order(match(pkgs, c("svMisc", "svSocket","svGUI")))]
-
- path0 <- getwd()
- lockfile <- file.path(path0, "00LOCK")
- if (file.exists(lockfile)) {
- ## We can safely assume that running svStart will not take more than
- ## 5 minutes, if 00LOCK is older, it means something went wrong
- ## previously, so we simply disregard it!
- if(difftime(Sys.time(), file.info(lockfile)[,"mtime"],
- units = "mins") < 5) {
- return (invisible(NULL))
- } else {
- file.remove(lockfile)
- }
- }
- file.create(lockfile)
- on.exit({
- file.remove(lockfile)
- ## Self-destruction
- if(exists("svStart", envir = parent.frame(), inherits = TRUE))
- rm("svStart", envir = parent.frame(), inherits = TRUE)
- debugMsg("svStart exit")
- }) # Clean up
-
- if (debug) {
- "debugMsg" <- function (...) cat("DEBUG:", ..., "\n")
- } else {
- "debugMsg" <- function (...) {};
- }
-
- ## Return if any of the sv* packages already loaded and Rserver running
- if (any(c("package:svGUI", "package:svSocket", "package:svMisc") %in% search())
- && existsFunction("getSocketServers")
- && !is.na(getSocketServers()["Rserver"])) {
- invisible(return(NA))
- }
-
- ## First of all, check R version... redefine compareVersion() because it is
- ## not defined in very old R versions... and thus we don't get an explicit
- ## error message in that particular case
- if (!existsFunction("compareVersion")) {
- `compareVersion` <- function (a, b) {
- a <- as.integer(strsplit(a, "[\\.-]")[[1]])
- b <- as.integer(strsplit(b, "[\\.-]")[[1]])
- for (k in 1:length(a)) {
- if (k <= length(b)) {
- if (a[k] > b[k]) return(1)
- else if (a[k] < b[k]) return(-1)
- } else return(1)
- }
- if (length(b) > length(a)) return(-1) else return(0)
- }
- }
- rVersion <- as.character(getRversion())
- res <- compareVersion(rVersion, minRVersion)
- if (res < 0) {
- res <- FALSE
- cat("Please upgrade R to use this version of SciViews \n")
- } else res <- TRUE
-
- ## Load main R packages
- ## (tools added to the list because now required by svMisc)
- res <- all(sapply(c("methods", "datasets", "utils", "grDevices", "graphics",
- "stats", "tools"), function (x)
- require(x, quietly = TRUE, character.only = TRUE)))
-
- ## Get environment variables
- if (res) {
- `svOption` <- function (arg.name,
- envName = gsub("\\.(\\w)", "\\U\\1", arg.name, perl = TRUE),
- default = NA, as.type = as.character, args = commandArgs(), ...) {
- pfx <- paste("^--", arg.name, "=", sep = "")
- x <- args[grep(pfx, args)]
- x <- if (!length(x)) Sys.getenv(envName) else sub(pfx, "", x)
- x <- as.type(x, ...)
- if (is.na(x) || x == "") x <- default
- x <- structure(list(x), names = arg.name)
- do.call("options", x)
- return(x)
- }
-
- args <- commandArgs()
- ## If started --quiet, display a simplified message but not if started
- ## -q, so that the user can still make it fully quiet!
- par <- args[grep("^--quiet$", args)]
- if (length(par) > 0) cat(R.version.string, "\n", sep = "")
-
- ## Collect SciViews socket client/server config from command line or vars
- ## Type of server to use (either http or socket)
- svOption("ko.type", default = "socket", args = args)
- ## Port used by the R socket server
- svOption("ko.serve", default = 8888, args = args, as.type = as.integer)
- ## Machine where Komodo is running
- svOption("ko.host", default = "localhost", args = args)
- ## Port used by the Komodo socket server
- svOption("ko.port", default = 7052, args = args, as.type = as.integer)
- ## The id used by Komodo
- svOption("ko.id", default = "SciViewsK", args = args)
- ## Do we reactivate Komodo?
- svOption("ko.activate", default = FALSE, args = args, as.type = as.logical)
- ## The id used for this R kernel in Komodo
- svOption("R.id", envName = "Rid", default = "R", args = args)
- ## If the initial directory is "", or it does not exist or it is not a dir
- ## we use the default home directory instead!
- ## The initial directory to use for R
- ## Note: the initial directory is used to load/save workspace and history
- svOption("R.initdir", envName = "Rinitdir", default = "~",
- args = args, as.type = function (x, default.dir) {
- if (x == "" || !file.exists(x) || !file.info(x)$isdir) {
- return (NA)
- } else {
- return(x)
- }
- }
- )
- }
- ## If ko.type is not socket, we don't load svSocket
- ko.type <- getOption("ko.type")
- if (ko.type != "socket")
- pkgsDontLoad <- c(pkgsDontLoad, "svSocket")
-
- ## Load tcltk package (if we use the socket server only)
- if (res && ko.type == "socket") {
- if (capabilities("tcltk")) {
- ## Make sure tcltk can start: on Mac OS X < 10.5 only,
- ## that is, darwin < 9, we need to check that X11 is installed
- ## (optional component!) and started!
- ## But this is not needed any more for R >= 2.8.0. Before we
- ## activate this test, we must find a way to start Tk later,
- ## when tktoplevel() is first invoked!
- #if (compareVersion(rVersion, "2.8.0") < 0) {
- if (regexpr("^darwin[5-8]", R.Version()$os) > -1) {
- ## First, is the DISPLAY environment variable defined?
- dis <- Sys.getenv("DISPLAY")
- if (dis == "") {
- Sys.setenv(DISPLAY = ":0") # Local X11
- dis <- Sys.getenv("DISPLAY")
- }
- ## Second, if DISPLAY points to a default local X11, make sure
- ## X11 is installed and started on this machine
- if (dis %in% c(":0", ":0.0", "localhost:0", "localhost:0.0",
- "127.0.0.1:0", "127.0.0.1:0.0")) {
- ## X11 is optional on Mac OS X 10.3 Panther and 10.4 Tiger!
- ## We locate 'open-x11' and run it,... not X11 directly!
- if (length(system('find /usr/bin/ -name "open-x11"',
- intern = TRUE)) == 0){
- cat("'open-x11' not found. Make sure you installed X11\n")
- cat("(see http://developer.apple.com/opensource/tools/runningx11.html\n")
- res <- FALSE
- } else { # Make sure X11 is started
- ## Trick: we try opening a non X11 prog,
- ## effect is starting X11 alone
- system("open-x11 more", intern = TRUE)
- }
- }
- rm(dis)
- }
-
- if (res) {
- res <- suppressPackageStartupMessages(require(tcltk, quietly = TRUE))
- if (!res) {
- cat("Error starting tcltk. Make sure Tcl/Tk is installed and can\n",
- "be run on your machine. Then, with packages svMisc, svSocket\n",
- "and svGUI installed, restart R or type require(svGUI)\n")
- }
- }
- } else cat("Tcl/Tk is required by SciViews,\n",
- "but it is not supported by this R installation\n")
- } else if (!res) cat("Problem loading standard R packages, check R installation\n")
-
- if (res) {
- ## Load packages svMisc, svSocket & svGUI (possibly after installing
- ## or upgrading them). User is supposed to agree with this install
- ## from the moment he tries to start and configure R from Komodo Edit
- #pkgs <- names(minVersion)
- #pkgs <- pkgs[!(pkgs %in% "R")]
-
- #ext <- switch(.Platform$pkgType, # There is a problem on some Macs
- # # => always install from sources there! mac.binary = "\\.tgz",
- # win.binary = "\\.zip", "\\.tar\\.gz")
- typ <- switch(.Platform$pkgType, # There is a problem on some Macs
- # => always install from sources there! mac.binary = "\\.tgz",
- win.binary = "win.binary", "source")
-
- ## Find a library location with write access, usually, last item in the
- ## list is fine
- lib <- .libPaths()
- k <- file.access(lib, 2) == 0
- if (!any(k)) {
- ## If nothing is available to current user, create user library location
- lib <- Sys.getenv("R_LIBS_USER")[1L]
- dir.create(lib, recursive = TRUE)
- ## Update library paths
- .libPaths(lib)
- } else {
- lib <- tail(lib[k], 1)
- }
-
- debugMsg("Installing packages if needed:")
- sapply(pkgs, function (pkgName) {
- debugMsg("Now trying package:", pkgName)
- pkgFile <- dir(path = pkg.dir, pattern = sprintf("%s_.*\\.%s",
- pkgName, pkg.extpat))
-
- if (length(file) > 0) {
- pkgVersion <- gsub(sprintf("(^%s_|\\.%s$)", pkgName,
- pkg.extpat), "", basename(pkgFile))
- i <- order(package_version(pkgVersion), decreasing = TRUE)[1]
- pkgFile <- pkgFile[i]
- pkgVersion <- pkgVersion[i]
-
- ## For some reasons (bug probably?) I cannot install a package
- ## in R 2.10.1 under Mac OS X when the path to the package has
- ## spaces. Also, correct a bug here when installing package
- ## from a repository where we are not supposed to prepend a
- ## path! Copy the file temporarily to the temp dir
- sourcefile <- file.path(pkg.dir, pkgFile)
- file <- file.path(tempdir(), pkgFile)
- repos <- NULL
-
- ## Remove directory lock if exists (happens sometimes on linux)
- if (.Platform$OS.type == "unix") {
- unlink(file.path(lib, "00LOCK"))
- #system(paste("rm -r -f", file.path(lib, "00LOCK")))
- }
- } else {
- ## No packages found, download from the web
- sourcefile <- NULL
- pkgFile <- pkgName
- repos <- remote.repos
- }
-
[TRUNCATED]
To get the complete diff run:
svnlook diff /svnroot/sciviews -r 404
More information about the Sciviews-commits
mailing list