Re: [R] Error in Arules

From: Tibert, Brock <BTibert_at_bentley.edu>
Date: Tue, 04 Mar 2008 17:14:01 -0500

Thanks for getting back to me.

Here are the basic commands:

These commands work:
library("arules")
basket <- read.csv("C:/Documents and Settings/ /Desktop/mba2.csv", na.strings=c(".", "NA", "", "?"))
basket2 <- as(split(basket$Product, basket$Id), "transactions")

the following command used to work. It stopped when I tried to edit the axes.
image(basket2)

Here is the error:
Error in image.default(basket2) : 'z' must be a matrix

As an aside, when I start R, I noticed that this shows up, and I do not remember if this was normal:


Loading required package: utils
Loading required package: stats
Loading required package: lattice

Attaching package: 'Matrix'

        The following object(s) are masked from package:stats :

         xtabs

Thanks again,

Brock

-----Original Message-----
From: Duncan Murdoch [mailto:murdoch_at_stats.uwo.ca] Sent: Tuesday, March 04, 2008 4:51 PM
To: Tibert, Brock
Cc: r-help_at_r-project.org
Subject: Re: [R] Error in Arules

On 04/03/2008 4:34 PM, Tibert, Brock wrote:
> Hi everyone,
>
>
>
> This is my first posting and I am just starting to fumble my way thru
R.
> I have been working thru the Arules package, and I used to be able to
> use the image function and I get the following message:
>
>
>
> Error in image.default(basket2) : 'z' must be a matrix
>
>
>
> I used to be able to plot the image. I only started to get this error
> when I tried to add x and y axis labels. Any ideas?

It would be helpful to show code that works, and code that doesn't. But

what the error message says is that someone (you? the code you called?)

called the image.default function with just one argument basket2, and it's not a matrix.

Duncan Murdoch



R-help_at_r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code. Received on Tue 04 Mar 2008 - 22:17:12 GMT

Archive maintained by Robert King, hosted by the discipline of statistics at the University of Newcastle, Australia.
Archive generated by hypermail 2.2.0, at Wed 05 Mar 2008 - 00:30:20 GMT.

Mailing list information is available at https://stat.ethz.ch/mailman/listinfo/r-help. Please read the posting guide before posting to the list.

list of date sections of archive