Hello everybody, I am working with the package bnlear, but, probably, error is caused not by the package itself.
There is a function cpquery() to which I pass argument str2: str2="(lag1=='s')" prob.s = cpquery(fitted1, event=eval(parse(text="(M=='s')")), evidence=eval(parse(text=str2))) - Error in parse(text = str2) : object 'str2' not found fitted1 is a fitted model But if I put value of str2 directly into function call: prob.s = cpquery(fitted1, event=eval(parse(text="(M=='s')")), evidence="(lag1.M1=='s')") it works fine. Does anybody have any idea how to fix it? PS: - I used documentation to the package: http://cran.r-project.org/web/packages/bnlearn/bnlearn.pdf function cpquery() - I also trued to use backslashes \' \" - doesn't work too -- Best regards, Alexandr [[alternative HTML version deleted]] ______________________________________________ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.