[R] barplot with vcd library

Gabor Grothendieck ggrothendieck at myway.com
Thu Sep 16 18:21:02 CEST 2004


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.




More information about the R-help mailing list