[rkward-devel] a new approach to external plugins

meik michalke Meik.Michalke at uni-duesseldorf.de
Tue Aug 9 14:02:40 UTC 2011


hi,

Am Montag, 8. August 2011, 10:49:52 schrieb Thomas Friedrichsmeier:
> RKWard currently runs installed.packages() on each session startup. When 
> many packages are installed, that can cost several seconds, esp. while the 
> disk cache is cold. Perhaps this pain could at least be shared

i just committed a small change to .rk.get.installed.packages() in svn. it 
adds two new elements to the list, one is a logical vector (whether "Enhances" 
in DESCRIPTION lists "rkward"), and the last one lists the found pluginmaps 
with full path. both entries are independent of the other, that is, the 
function does scan for a pluginmap even if there's no "Enhances: rkward" 
defined. we can see if we need/use that for anything, e.g. to highlight 
packages in the UI or so. however, in combination it's now quite easy to get 
to installed pluginmaps:

  inst.pack <- .rk.get.installed.packages()
  inst.pack$Plugins[inst.pack$EnhanceRK]
or
  inst.pack$Plugins[nchar(inst.pack$Plugins) > 0]

the whole scanning doesn't slow down the function notably.

i did two other small changes to it: i named the returned list elements (as 
seen above, which shouldn't hurt) and replaced

  library()$Title

and its checks with

  installed.packages(fields="Title")

which should give the same results in one go.


viele grüße :: m.eik

-- 
  dipl. psych. meik michalke
  abt. f"ur diagnostik und differentielle psychologie
  institut f"ur experimentelle psychologie
  heinrich-heine-universit"at d"usseldorf
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 190 bytes
Desc: This is a digitally signed message part.
URL: <http://mail.kde.org/pipermail/rkward-devel/attachments/20110809/c9b82b9c/attachment.sig>


More information about the Rkward-devel mailing list