[Rd] Computing minimal detectable differences for general ANOVA models

Duncan Temple Lang duncan at wald.ucdavis.edu
Sun Nov 16 17:53:12 CET 2008



Ali Baharev wrote:
> Dear Developers,
> 
> I would like to contribute to the R Project.
> 
> I implemented a C function the can be used to calculate minimal
> detectable differences for general ANOVA models (sample size
> calculations, power analysis).
> 
> A demo program and the source code is available from my website:
> 
> http://reliablecomputing.eu/ncbeta.html
> 
> What should i do in order to make my ncbeta function part of the R
> project source distribution?

As Brian said in  a separate message, build an R package
and distribute one or more R documented functions that
all the C code.
See the Writing R Extension's manual.

> 
> Probably the most troublesome parts of my code are those where error
> may occur, i do not know much about the proper error handling in R.

Calls to exit() as in your C code should be replaced with calls to

    PROBLEM "the error message"
    ERROR

Again, the R manuals (Writing R Extensions) will give you the
information you need.

> 
> Many thanks,
> 
> Ali
> 
> P.S. I see my suggestions
> https://stat.ethz.ch/pipermail/r-devel/2008-April/049317.html
> were considered in R 2.8.0.
> 
> ______________________________________________
> R-devel at r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/r-devel



More information about the R-devel mailing list