[R] Graphical Display of Values' Distribution
p.pagel at wzw.tum.de
Wed Sep 17 20:56:25 CEST 2008
> I have a column within a dataframe of values which range between 1 and
> 2. I want to display graphically the distribution of these values
> (i.e. are they clustered towards either exteme? Or spread evenly?).
> What is a good way of doing this in R?
> I've tried a few things, including using the 'hist' command, but
> receive the following error message:
> > hist(urban.long)
> Error in hist.default(urban.long) : 'x' must be numeric
> ...which is strange because all the values *are* numeric!
Your approach is correct with one minor glitch:
urban.long is not a vector but again a data.frame. Try
That should do what you want.
Dr. Philipp Pagel
Lehrstuhl für Genomorientierte Bioinformatik
Technische Universität München
85350 Freising, Germany
More information about the R-help