s-news
[Top] [All Lists]

Re: yaaq: yet another apply question

To: "'Thompson, David (MNR)'" <david.thompson@mnr.gov.on.ca>, "'s-news'" <s-news@lists.biostat.wustl.edu>
Subject: Re: yaaq: yet another apply question
From: "Thomas Jagger" <tjagger@blarg.net>
Date: Fri, 28 Jul 2006 12:44:21 -0600
In-reply-to: <327C2434A3DA2D4CB61554D644BAE48B0605E387@LRCPSSMBMXMB001.lrc.ad.gov.on.ca>
Thread-index: AcayYeByMq1HJcsOSied8eylSF35swAE8e4Q
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


<Prev in Thread] Current Thread [Next in Thread>