[R] Calling the correct one of 2 conflicting functions

Richards, Tom richards at upci.pitt.edu
Thu Jul 25 17:46:47 CEST 2002


My specific system is

> version
platform i386-pc-mingw32
arch     i386           
os       mingw32        
system   i386, mingw32  
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.

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