Re: [R] ARULES --> Filtering Rules by RHS

From: Seth Falcon <sfalcon_at_fhcrc.org>
Date: Thu 09 Feb 2006 - 02:26:22 EST

On 8 Feb 2006, Markus.Preisetanz@clientvela.com 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



R-help@stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html Received on Thu Feb 09 03:40:58 2006

This archive was generated by hypermail 2.1.8 : Fri 10 Feb 2006 - 21:35:43 EST