From michael.beer at unifr.ch  Mon Jul 25 15:12:48 2005
From: michael.beer at unifr.ch (michael.beer@unifr.ch)
Date: Mon, 25 Jul 2005 15:12:48 +0200 (CEST)
Subject: [Rd] density() fails if x contains Inf or -Inf (PR#8033)
Message-ID: <20050725131248.5C50CA24F@slim.kubism.ku.dk>

Full_Name: Michael Beer
Version: 2.1.0 and 2.1.1
OS: linux-gnu and mingw32
Submission from: (NULL) (134.21.49.141)


The command "density(c(0.5,0.6,Inf,0.7))" fails saying "Wrong type for argument
2 in call to massdist". This problem can be resolved by replacing "nx = nx" by
"nx = as.integer(nx)" in the call to massdist. When there are infinite values,
the value of sum(x.finite) is attributed to nx before. Thus nx is changed to
class "numeric" instead of "integer".



[Rd] density() fails if x contains Inf or -Inf (PR#8033)
michael.beer@unifr.ch