Hello, Davig,
Use eval(parse(paste(text=...))) form.
lapply(xxx, function(x)
try(eval(parse(text=paste("library(help=",x,")") ))))
###The try is here to prevent the function from dying on some missing or
sections without help files.
This generates a lot of readme.txt notepad windows (in Splus V6.1) but it
does get the initial help screens.
Tom
Dr. Thomas Jagger
Florida State University
Department of Geography
-----Original Message-----
From: s-news-owner@lists.biostat.wustl.edu
[mailto:s-news-owner@lists.biostat.wustl.edu] On Behalf Of Thompson, David
(MNR)
Sent: Friday, July 28, 2006 10:21 AM
To: s-news
Subject: [S] yaaq: yet another apply question
Hi,
I am trying to generate a listing of all functions available with:
xxx <- c('splus', 'stat', 'data', 'trellis', 'nlme3', 'menu', 'sgui',
'main', 'Design', 'Hmisc', 'chron', 'class', 'example5', 'examples',
'maps', 'MASS', 'missing', 'nlme2', 'nnet', 'robust', 'spatial',
'winjava', 'winspj')
lapply(xxx, function(x) library(help = x) )
Problem in library(help = x): No section "x" in the library directory:
D:/APPS/STATS/splus70\library
Apparently, I still do not understand the workings of the apply family.
Suggestions, please?
DaveT.
*********************************
Silviculture Data Analyst
Ontario Forest Research Institute
Ontario Ministry of Natural Resources
Sault Ste. Marie, Ontario, Canada
david.thompson@mnr.gov.on.ca
*********************************
--------------------------------------------------------------------
This message was distributed by s-news@lists.biostat.wustl.edu. To
unsubscribe send e-mail to s-news-request@lists.biostat.wustl.edu with
the BODY of the message: unsubscribe s-news
|