From hadley at rice.edu  Thu Jan 13 21:46:08 2011
From: hadley at rice.edu (Hadley Wickham)
Date: Thu, 13 Jan 2011 14:46:08 -0600
Subject: [Rd] Access R Help Content From R
In-Reply-To: <C9533FCE.124B9%proebuck@mdanderson.org>
References: <C9533FCE.124B9%proebuck@mdanderson.org>
Message-ID: <AANLkTi=K7esDfCDPxSnxReyoY8tpik+Dtq6pDBEQj4ao@mail.gmail.com>

You might want to take a look at the helpr package,
https://github.com/hadley/helpr, which provides a lot of functions
that do exactly that.  The key idea is to use tools::parse_Rd to parse
the Rd files into R data structures.

Hadley

On Wed, Jan 12, 2011 at 11:23 AM, Roebuck,Paul L
<proebuck at mdanderson.org> wrote:
> Have UI that simplifies running code from another (internal) package,
> allowing user to set values on fields I basically grabbed from results
> of calls to formals() for various functions. That works fine for the
> most part. But it was requested to investigate some type of popup help
> or something for each field.
>
> Since I already wrote the information in the dot-Rd files for what
> should be displayed, was wondering if (how) that information could
> be accessed. For example, given formal argument 'x' to function 'foo',
> I would like to grab the text associated with \item{x} in \arguments{}
> section of manual page, preferably without scraping.
>
> ______________________________________________
> R-devel at r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/r-devel
>



-- 
Assistant Professor / Dobelman Family Junior Chair
Department of Statistics / Rice University
http://had.co.nz/



[Rd] Access R Help Content From R
Hadley Wickham