[R] How to use a 'hidden' function directly?
    Dale Steele 
    dale.w.steele at gmail.com
       
    Thu Feb 25 02:31:23 CET 2010
    
    
  
I would like to be able to use two functions; qansari and pansari
which are found in the
function ansari.test.  How can I evaluate these functions
independently?  Thanks.  --Dale
For example, when I load the function ...
qansari <- function(p, m, n) {
                .C(R_qansari, as.integer(length(p)), q = as.double(p),
                  as.integer(m), as.integer(n))$q
            }
and attempt to evaluate ...
> qansari( 0.025, 5, 5)
Error in qansari(0.025, 5, 5) : object 'R_qansari' not found
methods(ansari.test)
stats:::ansari.test.default
the two functions that are part of ansari.test.default:
qansari <- function(p, m, n) {
                .C(R_qansari, as.integer(length(p)), q = as.double(p),
                  as.integer(m), as.integer(n))$q
            }
 pansari <- function(q, m, n) {
            .C(R_pansari, as.integer(length(q)), p = as.double(q),
                as.integer(m), as.integer(n))$p
        }
    
    
More information about the R-help
mailing list