[R] R: functions problem
michael watson (IAH-C)
michael.watson at bbsrc.ac.uk
Mon Dec 13 17:31:08 CET 2004
Sometimes it's in <function_name>.default Eg:
> barplot
function (height, ...)
UseMethod("barplot")
<environment: namespace:graphics>
> barplot.default
function (height, width = 1, space = NULL, names.arg = NULL,
legend.text = NULL, beside = FALSE, horiz = FALSE, density = NULL,
angle = 45, col = NULL, border = par("fg"), main = NULL,
sub = NULL, xlab = NULL, ylab = NULL, xlim = NULL, ylim = NULL,
xpd = TRUE, axes = TRUE, axisnames = TRUE, cex.axis = par("cex.axis"),
cex.names = par("cex.axis"), inside = TRUE, plot = TRUE,
axis.lty = 0, offset = 0, ...)
{
if (!missing(inside))
.NotYetUsed("inside", error = FALSE)
if (missing(space))
space <- if (is.matrix(height) && beside)
c(0, 1)
etc etc
Mick
-----Original Message-----
From: r-help-bounces at stat.math.ethz.ch on behalf of Clark Allan
Sent: Mon 12/13/2004 4:14 PM
To: r-help at stat.math.ethz.ch
Cc:
Subject: [R] R: functions problem
hi all
how can i see the code inside a particular function? i know one can
simply type the function, eg ls, but sometimes when this is done one
will get "UseMethod("some function name"). (One could also use "body"
but i have the same problem in this case. )How does one see the code in
this case?
More information about the R-help
mailing list