[R] how can I access parts of yags output

Juliet Hannah juliet.hannah at gmail.com
Wed Oct 29 23:48:23 CET 2008


Here is an example given from
?yags

library(methods)
data(stackloss)
Y1 <- yags(stack.loss~Air.Flow,id=1:21, data=stackloss)


How can I access parts of the output.

I tried:

> str(Y1)
Formal class 'yagsResult' [package "yags"] with 25 slots
  ..@ coefficients     : num [1:2] -44.13   1.02
  ..@ coefnames        : chr(0)

> Y1$coefnames
Error in Y1$coefnames : $ operator not defined for this S4 class

Thanks,

Juliet



More information about the R-help mailing list