Skip to content
Prev 279377 / 398506 Next

barplot ignoring col parameter

On 5 Dec 2011, at 15:58, R. Michael Weylandt wrote:

            
It does work. Might it be that my data is a matrix? I'm using it to give a name for each bar.
sessionInfo()
R version 2.14.0 (2011-10-31)
Platform: x86_64-apple-darwin9.8.0/x86_64 (64-bit)

locale:
[1] en_GB.UTF-8/en_GB.UTF-8/en_GB.UTF-8/C/en_GB.UTF-8/en_GB.UTF-8

attached base packages:
[1] splines   stats     graphics  grDevices utils     datasets  methods   base     

other attached packages:
[1] survival_2.36-10

loaded via a namespace (and not attached):
[1] tools_2.14.0


str(mydata)
num [1, 1:24] 2 108 0 0 0 1 3 0 0 0 ...
- attr(*, "dimnames")=List of 2
 ..$ : NULL
 ..$ : chr [1:24] "A" "B" "C" "D" ...


Basically, using the 'x' object as you created the code works, and I can have a workaround. I fail to see why it would not work using mydata.

Cheers

F
--
Federico C. F. Calboli
Neuroepidemiology and Ageing Research
Imperial College, St. Mary's Campus
Norfolk Place, London W2 1PG

Tel +44 (0)20 75941602   Fax +44 (0)20 75943193

f.calboli [.a.t] imperial.ac.uk
f.calboli [.a.t] gmail.com