On Oct 4, 2015, at 7:39 PM, Duncan Murdoch <murdoch.dun...@gmail.com> wrote:

> You'll get what you want if you use as.matrix(datentabelle)[,1]
> instead of datentabelle[,1].

This happens to work in this particular case, but fails if the data frame 
contains text columns.
Example:
   datentabelle <- cbind(datentabelle, text = sample(letters, 
nrow(datentabelle)))
   barplot(as.matrix(datentabelle)[,1])
   R>  Error in -0.01 * height : non-numeric argument to binary operator

Therefore I would get the row names from your data frame with 
rownames(datentabelle), and use them as the names.arg argument of barplot():

  barplot(datentabelle[,1], names.arg=rownames(datentabelle))

Cheers,
Boris

______________________________________________
R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see
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.

Reply via email to