check if p is a proportion
Merge pull request #1 from soride/master

check if p is a proportion from Sarah
Fix p>=0 if statement

Also allowed 0 and 1 because R will return \pm Inf rather than NaN