Re: [R] Axes of a histogram

From: Rotkiv, Rehceb <kungfista_at_gmx.de>
Date: Fri 08 Sep 2006 - 06:19:33 GMT

You're right, that's exactly what I needed! Thanks!

Rehceb

On Thu, 2006-09-07 at 14:47 +0200, Dimitris Rizopoulos wrote:
> probably you're looking for a barplot, e.g.,
>
> v <- c(1, 1, 2, 2, 2, 3, 3, 4, 4, 4)
> plot(factor(v))
>
>
> I hope it helps.
>
> Best,
> Dimitris
>
> ----
> Dimitris Rizopoulos
> Ph.D. Student
> Biostatistical Centre
> School of Public Health
> Catholic University of Leuven
>
> Address: Kapucijnenvoer 35, Leuven, Belgium
> Tel: +32/(0)16/336899
> Fax: +32/(0)16/337015
> Web: http://med.kuleuven.be/biostat/
> http://www.student.kuleuven.be/~m0390867/dimitris.htm
>
>
> ----- Original Message -----
> From: "Rotkiv, Rehceb" <kungfista@gmx.de>
> To: <r-help@stat.math.ethz.ch>
> Sent: Thursday, September 07, 2006 2:35 PM
> Subject: [R] Axes of a histogram
>
>
> > Hello everyone,
> >
> > I would be glad if you could help out an R-beginner here... I have a
> > vector of categorial data like this
> >
> >> v <- c(1, 1, 2, 2, 2, 3, 3, 4, 4, 4)
> >
> > When I do
> >
> >> hist(v)
> >
> > I get the x-axis of the histogram with floating point labels: 1.0,
> > 1.5,
> > 2.0, etc. Is it possible to tell R that the data consists of
> > categories,
> > i.e. that I only want the category names (1, 2, 3, 4) on my x-axis?
> >

> > Thanks in advance,
> > Rehceb Rotkiv
> >
> > ______________________________________________
> > R-help@stat.math.ethz.ch mailing list
> > 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.
> >
>
>
> Disclaimer: http://www.kuleuven.be/cwis/email_disclaimer.htm
>



R-help@stat.math.ethz.ch mailing list
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. Received on Fri Sep 08 16:34:31 2006

Archive maintained by Robert King, hosted by the discipline of statistics at the University of Newcastle, Australia.
Archive generated by hypermail 2.1.8, at Fri 08 Sep 2006 - 07:30:06 GMT.

Mailing list information is available at https://stat.ethz.ch/mailman/listinfo/r-help. Please read the posting guide before posting to the list.