Re: [Rd] Extract method for a new class

2008-09-22 Thread Sklyar, Oleg (London)
You will need to define several for different combinations of i and j types e.g. ANY,missing; ANY,ANY; missing,ANY or possibly for types like integer, character and logical more or less in the following way: setMethod("[", signature(x="haplogList", i="ANY",j="ANY"), function(x, i, j, ...,

Re: [Rd] Extract method for a new class

2008-09-19 Thread Martin Morgan
"Coster, Albart" <[EMAIL PROTECTED]> writes: > Dear list, > > I am trying to write a package for simulating meioses in R. We defined > a class 'haplotype' which contains the basic units of our simulation: > > setClass("haplotype",representation(snp = "numeric",qtl = "list", hID > = "numeric",phID0