Hi all, I am having a problem running the "impute" function from the bnlearn package. I have tried running the example in the documentation as follows: with.missing.data = gaussian.test with.missing.data[sample(nrow(with.missing.data), 500), "F"] = NA fitted = bn.fit(model2network("[A][B][E][G][C|A:B][D|B][F|A:D:E:G]"), gaussian.test) imputed = impute(fitted, with.missing.data) Which then returns the error message: Error: could not find function "impute" Can you please indicate what I am doing wrong here? My R version is: platform x86_64-w64-mingw32 arch x86_64 os mingw32 system x86_64, mingw32 status major 3 minor 3.1 year 2016 month 06 day 21 svn rev 70800 language R version.string R version 3.3.1 (2016-06-21) nickname Bug in Your Hair My bnlearn version is 4.0. Many thanks Ross [[alternative HTML version deleted]]
Dear Ross, On 17 March 2017 at 06:25, <ross.chapman at ecogeonomix.com> wrote:> I am having a problem running the "impute" function from the bnlearn > package.I assume you referred to the online documentation instead of the manuals that come with the package? I included impute() in bnlearn 4.1, so you will have to upgrade to use it. Cheers, Marco -- Marco Scutari, Ph.D. Lecturer in Statistics, Department of Statistics University of Oxford, United Kingdom