Message-ID: <20080917185625.GA6686@localhost>
Date: 2008-09-17T18:56:25Z
From: Philipp Pagel
Subject: Graphical Display of Values' Distribution
In-Reply-To: <BAY135-W21B49E5DE5BCA266E44FFE884C0@phx.gbl>
> 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[3])
> Error in hist.default(urban.long[3]) : 'x' must be numeric
>
> ...which is strange because all the values *are* numeric!
Your approach is correct with one minor glitch:
urban.long[3] is not a vector but again a data.frame. Try
hist(urban.long[,3])
That should do what you want.
cu
Philipp
--
Dr. Philipp Pagel
Lehrstuhl f?r Genomorientierte Bioinformatik
Technische Universit?t M?nchen
Wissenschaftszentrum Weihenstephan
85350 Freising, Germany
http://mips.gsf.de/staff/pagel