On 2010-04-14 21:20, Uwe Dippel wrote:
Referring to "Using R for Data Analysis and Graphics" by J H Maindonald,
and available from the R site, I found the example on p.30 non-working:
> stem(qqnorm(possum$hdlngth))
Error in stem(qqnorm(possum$hdlngth)) : 'x' must be numeric
Since qqnorm(possum$h
mtmor...@fhcrc.org wrote:
>> setClass("foo",representation(x="numeric"))
>
> This creates an *S4* class which HAS A 'slot' x that is of type numeric.
>
>>> setMethod("plot","foo",function(x,y,...)boxplot(x,...))
>>> x <- rnorm(100)
>>> class(x) <- "foo"
>
> uh oh, this is creating an *S3* class tha
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)
> "N" == Nick <[EMAIL PROTECTED]>
> on Sat, 15 Nov 2008 13:39:44 -0800 (PST) writes:
N> Code: # svm is an S3 class, so: setOldClass("svm")
N> # Create the super class model: setClass("model")
N> # For svm from e1071 this works (well gives no error):
N> setIs("svm", "
4 matches
Mail list logo