nutterb/HydeNet

inputCPT error

Closed this issue · 1 comments

Not sure what's going on here.

> inputCPT(stressECGResult ~ doStressECG*cad, factorLevels=list(stressECGResult = c("Not Done", "Negative", "Positive"), doStressECG = c("No","Yes"), cad = c("No","Yes")))
--------------------------------------------------------------------------------
NOTE: parameter 'reduce' is set to TRUE in readCPTFromConsole().
      Conditional probabilities Pr(stressECGResult=Not Done | doStressECG, cad) will be calculated
      as the complement of the inputted probabilities Pr(stressECGResult != Not Done | doStressECG, cad).
--------------------------------------------------------------------------------
Enter the following conditional probabilities:
Use '<q>' to halt execution.
To go back one step and re-enter, enter '<b>'.
--------------------------------------------------------------------------------
Pr(stressECGResult=Negative | doStressECG=No , cad=No ):   0
Pr(stressECGResult=Positive | doStressECG=No , cad=No ):   0
Pr(stressECGResult=Negative | doStressECG=Yes, cad=No ):   0.77
Pr(stressECGResult=Positive | doStressECG=Yes, cad=No ):   0.23
Pr(stressECGResult=Negative | doStressECG=No , cad=Yes):   0
Pr(stressECGResult=Positive | doStressECG=No , cad=Yes):   0
Pr(stressECGResult=Negative | doStressECG=Yes, cad=Yes):   0.32
Pr(stressECGResult=Positive | doStressECG=Yes, cad=Yes):   0.68
Error in match(x, table, nomatch = 0L) : 
  argument "x" is missing, with no default

In making cpt and inputCPT generic methods, I changed the original vars argument to a generic x. But the last line in inputCPT was still using vars. This is now corrected.