Re: [R] density(x)

From: Winfried Theis <theis_at_statistik.uni-dortmund.de>
Date: Tue 06 Jul 2004 - 01:43:39 EST

Hello!
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 http://www.R-project.org/posting-guide.html) giving some details on the procedure you use to read in the data may have helped to give you a precise answer!

Regards,

Winfried

-- 
-----------------------------------------------------------------
Dr. Dipl.-Math. Winfried Theis, SFB 475, Projekt C5,
Universitšt Dortmund, 44221 Dortmund
e-mail: theis@statistik.uni-dortmund.de
Tel.: +49/231/755-5903 FAX: +49/231/755-4387

______________________________________________
R-help@stat.math.ethz.ch mailing list
https://www.stat.math.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html
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