ARULES --> Filtering Rules by RHS

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

ARULES --> Filtering Rules by RHS

Markus Preisetanz
Dear Colleagues,

 

I would like to only inspect rules that contain a certain label substring on the rhs. In this special case the item labels are built like this:

<itemtype>_<itemvalue> e.g. "Artikelgruppe_E0815" what I want to do is only show rules where "Artikelgruppe" is contained in the rhs - has anybody an idea how this could work?

 

Sincerely

 

___________________

Markus Preisetanz

Consultant

 

Client Vela GmbH

Albert-Roßhaupter-Str. 32

81369 München

fon:          +49 (0) 89 742 17-113

fax:          +49 (0) 89 742 17-150

mailto:[hidden email] <mailto:[hidden email]>



Diese E-Mail enthält vertrauliche und/oder rechtlich geschützte Informationen. Wenn Sie nicht der richtige Adressat sind oder diese E-Mail irrtümlich erhalten haben, informieren Sie bitte sofort den Absender und vernichten Sie diese Mail. Das unerlaubte Kopieren sowie die unbefugte Weitergabe dieser E-Mail ist nicht gestattet.

This e-mail may contain confidential and/or privileged infor...{{dropped}}


______________________________________________
[hidden email] mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html
Reply | Threaded
Open this post in threaded view
|

Re: ARULES --> Filtering Rules by RHS

Seth Falcon-2
On  8 Feb 2006, [hidden email] wrote:
> I would like to only inspect rules that contain a certain label
> substring on the rhs. In this special case the item labels are built
> like this:
>
> <itemtype>_<itemvalue> e.g. "Artikelgruppe_E0815" what I want to do
> is only show rules where "Artikelgruppe" is contained in the rhs -
> has anybody an idea how this could work?

I think there is a rhs() method you can use to get an itemMatrix
instance containing just the RHS.  Then one options might be something
like (untested):

isets <- LIST(items(rhs(foo)))

lapply(isets, function(x) grep("Artikelgruppe", isets))

oop, I just realized: do you mean RHS of the association rule or RHS
of the <foo>_<bar>?

hth,

+ seth

______________________________________________
[hidden email] mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html