[R] Howto access object of object

Gundala Viswanath gundalav at gmail.com
Wed Jan 14 09:07:01 CET 2009


Dear all,

I have the following object:

> print(x)
An object of class "matrix.csr"
Slot "ra":
 [1] 0.992056718 1.000000000 1.000000000 1.000000000 1.000000000 1.000000000
 [7] 1.000000000 1.000000000 1.000000000 1.000000000 1.000000000 1.000000000
[13] 1.000000000 1.000000000 1.000000000 1.000000000 1.000000000 1.000000000
[19] 1.000000000 1.000000000 1.000000000 0.002647761 0.000882587 0.000882587
[25] 0.000882587 0.000882587 0.000882587 0.000882587

Slot "ja":
 [1] 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1

Slot "ia":
  [1]  1  2  3  4  5  6  7  8  9 10 11 12 13 14 15 16 17 18 19 20 21 22 22 22 22
 [26] 22 22 22 22 22 22 22 22 22 22 22 22 22 22 22 22 22 22 22 22 22 22 22 22 22
 [51] 22 22 22 22 22 22 22 22 22 22 22 22 22 22 22 22 22 22 22 22 22 22 22 22 22
 [76] 22 22 22 22 22 22 22 22 22 22 22 22 22 22 22 22 22 22 22 22 22 22 22 22 22

Slot "dimension":
[1] 100   1

__ END__

How can I acces "Slot 'ra'" only?

I tried

print(x$ra)

but fail.

- Gundala Viswanath
Jakarta - Indonesia




More information about the R-help mailing list