Skip to content

Beginning R metrics

4 messages · Dirk Eddelbuettel, Alexy Khrabrov

#
Trying to follow the examples in User Guides, I've found a bit more
step-by-step instruction is needed.  Apparently, xmp* functions load
with fBasics package.   However, trying to load them with xmpfBasics()
menu shows the menu which is not self-explanatory -- a mapping to the
User Guide is desirable.

Generally, a concise list of actions would be very helpful -- starting
with "install *these* packages from CRAN" -- exactly which ones and
how -- then, a HOWTO on following the Guides.  A way to list/check the
list of examples would help.

Cheers,
Alexy
#
On 10 September 2006 at 14:35, Alexy Khrabrov wrote:
| Trying to follow the examples in User Guides, I've found a bit more
| step-by-step instruction is needed.  Apparently, xmp* functions load
| with fBasics package.   However, trying to load them with xmpfBasics()
| menu shows the menu which is not self-explanatory -- a mapping to the
| User Guide is desirable.
| 
| Generally, a concise list of actions would be very helpful -- starting
| with "install *these* packages from CRAN" -- exactly which ones and
| how -- then, a HOWTO on following the Guides.  A way to list/check the
| list of examples would help.

Well, R itself comes with six manuals; to learn R you could consider the
introductory manual, FAQ, etc.  As for Rmetrics, it also comes with a rather
extensive and unparallel set of manuals for each module.

And consider that almost every function is documented with examples, so try 
	> help("xmpFoo")
	> example("xmpFoo")
for whichever function xmpFoo you are interested.

Lastly, all of R is written by volunteer contributors. So with all due
respect, if you consider something is missing, maybe a good way to fix it
would be to draft such a helpful document and to place on a website somewhere
with requests for comments.

Regards,  Dirk
#
In fact, I was asking for a way to sync the examples in the User
Guides with the packages themselves  -- what is the intended way to
get the examples for fBasics shown in the fBasics.pdf in the sequence
from the text?  I.e., in fBasics.pdf, on page 32, there's sample code
-- I wonder how one would load/see it, if it's available?

Cheers,
Alexy
#
On 10 September 2006 at 16:49, Alexy Khrabrov wrote:
| In fact, I was asking for a way to sync the examples in the User
| Guides with the packages themselves  -- what is the intended way to
| get the examples for fBasics shown in the fBasics.pdf in the sequence
| from the text?  I.e., in fBasics.pdf, on page 32, there's sample code
| -- I wonder how one would load/see it, if it's available?

For the particular case, I think we have to defer to Rmetrics author on
that. Looking at the sources of fBasics here, I see that it has a demo/
directory so that you have the demo() commands as well -- try those.

For the general case, one would have to invent a way to link documentation
and examples in a generic fashion.  

Now, it turns out that R actually solved that for the particular case of
vignette() documentation.  For a given vignette foo, e.g. what you'd see by
issueing
	> vignette("foo")
where my favourite example is probably the vignette of the zoo package, you
also get code included in the vignette via
	> edit(vignette("foo"))

In other words, for my zoo example it is 
	> library(zoo)			## load the library
	> vignette("zoo")		## display the pdf document
	> edit(vignette("zoo"))		## extracts and displays the code

Now, for your particular case of fBasics et al, you are out of luck.  Dr
Wuertz started the Rmetrics project way before R matured to the point that it
could support all of Rmetrics; luckily we are now at a point where R "can do"
Rmetrics.  

However, Rmetrics' documentation precedes the vignette-style documentation
mechanism that was added to R in the last few years.  So I am afraid you're
back to doing the extraction the manual way. Sorry!

Hope this help,  Dirk