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
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
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"
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)
4 matches
Mail list logo