[R] NA/NaN values in bnlearn package R

David Winsemius dwinsemius at comcast.net
Mon Jun 9 07:13:40 CEST 2014

On Jun 8, 2014, at 6:27 PM, Alexsandro Cândido de Oliveira Silva wrote:

> Hello,
> I am using the bnlearn package in R to handle large amounts of data in Bayesian networks. The variables are discrete and have more than 3 million observations.
> With bn.fit function I could easily get the conditional probability distribution. However, some variables have unobserved values ??(i.e., NA or NaN). In some variables, unobserved values ??are almost 1 million. This is a lot to just delete them.
> In tests, I've got this:
>> nw.fit <-bn.fit (nw, date, method = 'bayes')
> Error in check.data (date): the data set contains null / NaN / NA values??.
> So, how could I deal with the data and get the conditional probability distribution?
> Could someone help me?

You are requested not to crosspost at multiple R mailing lists (and by extension of the reasoning behind that request, crossposting on Rhelp and StackOverflow is also considered discourteous.)

Both Rhelp and SO expect yopu to provide enough information to comment intelligently, but you have not lived up to that expectation.

David Winsemius
Alameda, CA, USA

More information about the R-help mailing list