[R] Getting code for functions

Peter Flom flom at ndri.org
Mon Sep 27 18:14:18 CEST 2004


Hello

Pardon for the elementary question, I did try searching the archives
with various terms, but to no avail.  I am using R1.9.1 on a windows
machine

One of the great advantages of R (to me, anyway) is being able to see
the code for a function , e.g. by typing sd one sees the code for
getting a standard deviation.

However, for many functions this only provides info. including
UseMethod, eg. typing mosaicplot yields

function (x, ...) 
UseMethod("mosaicplot")
<environment: namespace:graphics>


How can I see the code for such functions?



Thanks in advance as always

Peter

Peter L. Flom, PhD
Assistant Director, Statistics and Data Analysis Core
Center for Drug Use and HIV Research
National Development and Research Institutes
71 W. 23rd St
www.peterflom.com
New York, NY 10010
(212) 845-4485 (voice)
(917) 438-0894 (fax)




More information about the R-help mailing list