Re: [R] ShortRead with BWA

2010-04-27 Thread mtmorgan
Hi Duke -- Quoting Duke : Dear folks, Please welcome a newbie both to R and the mailing list :). I am currently working on a sequencing project, and heard about R as well as some of its packages for next gen sequencing, and decided to give it a try. Starting with ShortRead, I found a document

Re: [R] How to reduce key strokes when defining S4 classes?

2009-10-26 Thread mtmorgan
Quoting Peng Yu : I feel tedious when I define a S4 class and the methods. For each method, I have to call both setMethod and setGeneric (or both setReplaceMethod and setGeneric). I would like a more compact grammar so that I can reduce the key strokes. I'm wondering if there is a better way ava

Re: [R] How to change a slot by a method?

2009-10-26 Thread mtmorgan
Quoting Peng Yu : In the following code, 'multiply' doesn't multiply a...@x by 2. I'm wondering how to define a method that can change the slot of a class. $ Rscript setGeneric.R setClass( + Class='A', + representation=representation( + x='numeric' + ) + ) [1] "A"

Re: [R] classes and methods

2009-03-19 Thread mtmorgan
Hi Edna -- Quoting Edna Bell : I have put together a test class and methods setClass("foo",representation(x="numeric")) [1] "foo" This creates an *S4* class which HAS A 'slot' x that is of type numeric. setMethod("plot","foo",function(x,y,...)boxplot(x,...)) [1] "plot" x <- rnorm(100)