Hi:
Here's one way to do it, using ggplot2 and base graphics.
# Simulate a data frame with values between 0 and 1 and a corresponding
frequency
df <- data.frame(val = round(runif(100), 2), freq = rpois(100, 10))
# findInterval assigns the values between 0 and 1 to intervals with width
0.1; you n
Look at the cut, tapply, and barplot functions. There is probably also a nice
way to do this using ggplot2 package.
--
Gregory (Greg) L. Snow Ph.D.
Statistical Data Center
Intermountain Healthcare
greg.s...@imail.org
801.408.8111
> -Original Message-
> From: r-help-boun...@r-project.o
On Tue, Mar 29, 2011 at 11:05:08AM +0200, Karin Lagesen wrote:
> Hi!
>
> I have a dataset that looks like this:
>
> 0.0 14
> 0.0 3
> 0.9 12
> ...and so on.
>
> I would like to plot this in a histogram-like manner.
One way would be to re-create the original data and then simply use
hist:
3 matches
Mail list logo