Hi Medic, Perhaps this: medic_df<-read.table(text="name number ds 6277 lk 24375 ax 46049 dd 70656 az 216544 df 220620 gh 641827", header=TRUE) library(plotrix) options(scipen=10) barp(medic_df$number,names.arg=medic_df$name,width=0.5)
As others have noted, this is really a barplot with no spaces between the bars. Jim On Sat, Nov 10, 2018 at 5:46 AM Medic <mailipadp...@gmail.com> wrote: > > What would be the correct code (simplest version) (without gplot()) > for histogram (with 7 bars), which would include 7 names of bars under > the X-axis. The data are: > > name number > ds 6277 > lk 24375 > ax 46049 > dd 70656 > az 216544 > df 220620 > gh 641827 > > (I'm attaching mydata.r, making with dput.) > > My attempt is: > > options(scipen=999) > with (mydata, hist(number)) > > P.S. I can't understand how the column "name" to include in a code > ______________________________________________ > 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. ______________________________________________ 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.