unused argument in density function

Hi, I tried to estimated the density function for this variable. The variable has 11835 observations. When I run the following code
dBeligium <- density(Europeanstockmarketdata$BBELGIUM, na.rm=TRUE)
I receive : unused argument (na.rm = TRUE)
If I remover the na.rm from the code as: dBeligium <- density(Europeanstockmarketdata$BBELGIUM)
I receive: Error: C stack usage 15928272 is too close to the limit.
Is there anything wrong with my first code ?

Is it possible that a package you have loaded is masking the intended density() function? What happens if you run

dBelgium <- stats::density(Europeanstockmarketdata$BBELGIUM, na.rm=TRUE)

That makes sense yeah ! when I included stat:: density it works well. Many thanks for the help

This topic was automatically closed 21 days after the last reply. New replies are no longer allowed.

If you have a query related to it or one of the replies, start a new topic and refer back with a link.