typo spotted, appears to be harmless. lopP <- max(logP, 0) should be logP <- max(logP, 0)
typo spotted, appears to be harmless.
lopP <- max(logP, 0)
should be
logP <- max(logP, 0)