Re: [R] density(x)

From: Winfried Theis <>
Date: Tue 06 Jul 2004 - 01:43:39 EST

On Mon, 2004-07-05 at 15:34, Christoph Hanck wrote:
> Dear experts,
> when trying to estimate an kernel density function with density(x) I get the following
> error message with imported data from either EXCEL or text files:
> Error in density(spr) : argument must be numeric.
Well, as R tells you: You should check, whether your data is of type "numeric". Depending on the way you import the data "spr" this may not be the case and you have to do
> density(as.numeric(spr))

which should work... Besides: please read the guidelines for posting (see giving some details on the procedure you use to read in the data may have helped to give you a precise answer!



Dr. Dipl.-Math. Winfried Theis, SFB 475, Projekt C5,
Universitšt Dortmund, 44221 Dortmund
Tel.: +49/231/755-5903 FAX: +49/231/755-4387

______________________________________________ mailing list
PLEASE do read the posting guide!
Received on Mon Jul 05 23:48:31 2004

This archive was generated by hypermail 2.1.8 : Wed 03 Nov 2004 - 22:54:41 EST