[R] barplot with vcd library

Gabor Grothendieck
Thu, 16 Sep 2004 16:21:02 -0000

Tatsuki Koyama <Tatsuki.Koyama <at> Vanderbilt.edu> writes:

:
: 'barplot' doesn't seem to work with vcd library.
: Am I supposed to detach vcd when I want to use barplot?
: Here's an example.
: Say I have the following matrix,
:
: > m <- matrix(c(1,2,3, 4,5,6, 3,4,5, 2,3,4), ncol=4)
: > m
:      [,1] [,2] [,3] [,4]
: [1,]    1    4    3    2
: [2,]    2    5    4    3
: [3,]    3    6    5    4
:
: Then
: > barplot(m)
: gives a barplot of the data.
:
: However, when I attach 'vcd' library, the same command does not seem
: to work.

graphics::barplot(m)

will tell R you want the version in graphics rather than the one in vcd.