Skip to content
Prev 255914 / 398506 Next

Support Counting

On Tue, Apr 05, 2011 at 08:43:34AM -0500, psombe wrote:
Hi.

R-help can provide help for some of the frequently used CRAN packages,
but not for all. There are too many of them. It is not clear, whether
there is someone on R-help, who uses "arules". One of my students is using
Eclat for association rules directly, but not from R. I am using R, but
not for association rules.

Try to determine, whether your question is indeed specific to "arules".
If the question may be formulated without "arules", it has a good chance
to be replied here. Otherwise, send a query to the package maintainer.
Package maintainers usually welcome feedback.
Up to here, this may be simplified, if the required indices
are stored in a vector, say, "indices". For example

  indices <- c(3, 5, 6, 10)
  avec <- array(0, dim=14)
  avec[indices] <- 1
  amat <- rbind(avec)

or

  amat <- matrix(0, nrow=1, ncol=14)
  amat[1, indices] <- 1
  amat

       [,1] [,2] [,3] [,4] [,5] [,6] [,7] [,8] [,9] [,10] [,11] [,12] [,13] [,14]
  avec    0    0    1    0    1    1    0    0    0     1     0     0     0     0

Hope this helps.

Petr Savicky.