[R] Help to find only one class and differennt class

Muhammad Subianto msubianto at gmail.com
Tue Dec 20 16:16:20 CET 2005


Dear R users,
I have a problem, which I can not find a solution.
Probably someone could help me?
I have a result from my classification, like this

> credit.toy
[[1]]
     age married ownhouse income gender class
1  20-30      no       no    low   male  good
2  40-50      no      yes medium female  good

[[2]]
     age married ownhouse income gender class
1  20-30     yes      yes   high   male  poor
2  20-30      no      yes   high   male  good
3  20-30     yes       no    low female  poor
4  60-70     yes      yes    low female  poor
5  60-70      no      yes   high   male  poor

[[3]]
     age married ownhouse income gender class
1  30-40     yes       no   high   male  good
2  20-30      no      yes medium female  good

[[4]]
     age married ownhouse income gender class
1 50-60     yes      yes    low female  poor
2 40-50     yes       no medium   male  poor
3 20-30      no       no   high female  poor

[[5]]
     age married ownhouse income gender class
1 40-50      no      yes    low female  good
2 60-70      no      yes medium   male  poor
3 30-40     yes       no   high female  poor

[[6]]
     age married ownhouse income gender class
1 30-40      no       no medium female  good
2 50-60     yes      yes   high female  good
3 30-40     yes       no   high female  good

> credit.toy[[5]]$class
[1] good poor poor
Levels: good poor
>

How can I count there are only one class and differennt class.
I need the result something like
good class : 1,3,6
poor class : 4
good and poor class : 2,5

Thanks in advance.
Sincerely, Muhammad Subianto




More information about the R-help mailing list