[R-SIG-Mac] R stats: not recognising 'F' as 'FALSE'
Duncan Murdoch
murdoch.duncan at gmail.com
Thu Feb 11 10:13:12 CET 2016
On 30/10/2015 12:30 PM, Liam Shaw wrote:
> A student noticed that passing 'F' for 'FALSE' did not have an effect when
> using functions in the stats base package.
>
> Example:
>
>> pt(q=1.12, df=12, lower.tail=TRUE)
> [1] 0.8576851
>> pt(q=1.12, df=12, lower.tail=F)
> [1] 0.8576851
>> pt(q=1.12, df=12, lower.tail=FALSE)
> [1] 0.1423149
>
> I couldn't replicate the problem. Re-installing and updating R on their
> machine had no effect. Does anybody know what could be causing this?
F is a variable. If the student says
F <- 1
it would have that effect. This is why we recommend that you never use
F when you want FALSE.
Duncan Murdoch
More information about the R-SIG-Mac
mailing list