From p.dalgaard at biostat.ku.dk  Fri Nov 13 17:24:26 2009
From: p.dalgaard at biostat.ku.dk (Peter Dalgaard)
Date: Fri, 13 Nov 2009 17:24:26 +0100
Subject: [Rd] error checks
In-Reply-To: <1258123410.17658.6.camel@punchbuggy>
References: <1258123410.17658.6.camel@punchbuggy>
Message-ID: <4AFD883A.7040907@biostat.ku.dk>

Terry Therneau wrote:
>  I'm currently packaging up some of the kinship matrix routines more
> formally, these are used in coxme when dealing with family correlation
> structures.  One of my test programs exercises error conditions, i.e.,
> it purposely feeds particular types of invalid pedigree data in to see
> if the right error message results.  So there are comment-action pairs
> 	# the next line should generate a "pedigree loop" error
> 	kindepth(.....
> 
> As I found out last night, such tests case a failure of R CMD check!
> Any suggestions on how to properly package these?

I believe the canonical way is to use a try() wrapper, then verify that 
the return value has class "try-error"

>  A second question is keywords.  None of the standard ones apply to this
> code -- I'd like "genetics".  How do we add a new one?  
> 
> Terry T.
> 
> ______________________________________________
> R-devel at r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/r-devel


-- 
    O__  ---- Peter Dalgaard             ?ster Farimagsgade 5, Entr.B
   c/ /'_ --- Dept. of Biostatistics     PO Box 2099, 1014 Cph. K
  (*) \(*) -- University of Copenhagen   Denmark      Ph:  (+45) 35327918
~~~~~~~~~~ - (p.dalgaard at biostat.ku.dk)              FAX: (+45) 35327907



[Rd] error checks
Peter Dalgaard