Skip to content

Histogram

1 message · R Help

#
I'm getting the impression that you're not overly familiar with R?  If
so then you should really try and read some of the manuals from
r-project.org.  R is a very complex language and has a steep learning
curve.

That being said, the command takes a 2xK array, where K is the number
of observations you have, and 2 is the number of categories (in your
case I picked two because your example has intervention and control).
The first two lines in my example were just to create some sample data
to work with.

For the graph example you provided, you would create a 2x13 matrix,
called dat, and then use the command

barplot(dat,beside=TRUE)

In terms of setting the x and y axis labels, and the tick-marks as
they are defined in the figure, see the options provided by ?barplot,
or type help.start() and search for barplot from there.

And to Rolf: I understand the frustration with posts that are simple
like this, but just because your type RTFM instead of the full
sentence doesn't mean you're not swearing at strangers on the
Internet.  Try being a little more constrained in your responses.

Hope that helps,
Sam
On Thu, Jun 9, 2011 at 1:38 AM, Nandini B <nandini_bn at hotmail.com> wrote: