Dale Steele wrote:
> 
> 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
>         }
> 

Sorry, I didn't consider this part of your message carefully.  R_quansari
and R_pansari are indeed variables, but they are unexported variables in the
stats namespace.  Therefore if you want to use these functions outside of
their namespace, you will need something like:

  pansari <- function(q, m, n) {
            .C( stats:::R_pansari, as.integer(length(q)), p = as.double(q),
                as.integer(m), as.integer(n))$p
        }

Hope this helps!

-Charlie
-- 
View this message in context: 
http://n4.nabble.com/How-to-use-a-hidden-function-directly-tp1568392p1568408.html
Sent from the R help mailing list archive at Nabble.com.

______________________________________________
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.

Reply via email to