[R] Calling the correct one of 2 conflicting functions

ripley@stats.ox.ac.uk ripley at stats.ox.ac.uk
Thu Jul 25 18:01:14 CEST 2002


get("ecdf", "package:stepfun") will get the one in stepfun, and so on.

On Thu, 25 Jul 2002, Richards, Tom wrote:

> Hello,
>
> My specific system is
>
> > version
>          _
> platform i386-pc-mingw32
> arch     i386
> os       mingw32
> system   i386, mingw32
> status
> major    1
> minor    5.1
> year     2002
> month    06
> day      17
> language R
>
>
> Each of the hmisc and stepfun packages has a function named ecdf(), and I
> have my own package which requires both of these packages.  Is there a way
> to ensure that the correct ecdf function is called by one of my own
> functions, that is, if both packages are in the search path?  For example,
>
> > library(stepfun);library(hmisc)
> > vv <- rnorm(1000)
> > ecdf(vv)
>
> yields a plot using the hmisc ecdf function, and the following additional
> staments yield a similar plot using Martin's version:
>
> > detach("package:stepfun");library(stepfun)
> > ecdf(vv)
> > plot(.Last.value)
>
> But then doing
>
> > this <- ecdf(vv,pl=F)
>
> ,trying to use an argument to specify Frank's function, leads to an error.
> Is there a way to explicitly call the function I want?  Thanks in advance.
>
> Tom
> -.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
> r-help mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html
> Send "info", "help", or "[un]subscribe"
> (in the "body", not the subject !)  To: r-help-request at stat.math.ethz.ch
> _._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._
>

-- 
Brian D. Ripley,                  ripley at stats.ox.ac.uk
Professor of Applied Statistics,  http://www.stats.ox.ac.uk/~ripley/
University of Oxford,             Tel:  +44 1865 272861 (self)
1 South Parks Road,                     +44 1865 272860 (secr)
Oxford OX1 3TG, UK                Fax:  +44 1865 272595

-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
r-help mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html
Send "info", "help", or "[un]subscribe"
(in the "body", not the subject !)  To: r-help-request at stat.math.ethz.ch
_._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._



More information about the R-help mailing list