Hi again List:
This time I have the following:
setClass(dog,representation(breed=numeric))
[1] dog
woof - function(x=1:10) {
+ if(!is.numeric(x))stop(Must have numeric data)
+ y - new(dog,breed=x)
+ return(y)
+ }
setMethod(plot,dog,
+ function(x,y,...) {
+ plot(x@breed,col=blue,type=l)
+ }
+ )
On 22.02.2011 09:15, Laura Smith wrote:
Hi again List:
This time I have the following:
setClass(dog,representation(breed=numeric))
[1] dog
woof- function(x=1:10) {
+ if(!is.numeric(x))stop(Must have numeric data)
+ y- new(dog,breed=x)
+ return(y)
+ }
setMethod(plot,dog,
+
2 matches
Mail list logo