From duncan at wald.ucdavis.edu  Sun Nov 16 17:53:12 2008
From: duncan at wald.ucdavis.edu (Duncan Temple Lang)
Date: Sun, 16 Nov 2008 08:53:12 -0800
Subject: [Rd] Computing minimal detectable differences for general ANOVA
 models
In-Reply-To: <34dd040c0811160806g4513ea6ci318a2f43c2ddbefa@mail.gmail.com>
References: <34dd040c0811160806g4513ea6ci318a2f43c2ddbefa@mail.gmail.com>
Message-ID: <49204FF8.9040706@wald.ucdavis.edu>



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



[Rd] Computing minimal detectable differences for general ANOVA models
Duncan Temple Lang