[R] barplot error

Farrel Buchinsky fjbuch at gmail.com
Tue Oct 17 17:38:14 CEST 2006


I created a dataframe called OSA
here is what it looks like
  no.surgery surgery
0        0.4     6.9
6        0.2     0.3

I have also attached it as an R data file

I cannot understand why I am getting the following error.

> barplot(OSA)
Error in barplot.default(OSA) : 'height' must be a vector or a matrix

OSA is a data.frame which means R should see it as a matrix.
What am I not understanding?

-- 
Farrel Buchinsky
Mobile: (412) 779-1073


More information about the R-help mailing list