On 17/11/2008, at 1:56 PM, David C. Howell wrote:
Sampling with and without replacement
I seem unable to use "replace = F" when I want to sample without
replacement. I would think
that it comes down to "F is not a legitimate abbreviation for FALSE."
except that
Dalgaard (p. 118) uses F for FALSE and it works
"pairwise.t.test(folate, ventilation, pool.sd = F)"
I am having trouble when I try to sample a vector without replacement.
The following code illustrates my problem.
<snip>
(a) Naughty Peter. It works, but is ill-advised. The difference is
that FALSE is a reserved word (as is TRUE) but F and T are *not*
reserved.
(b) Try find("F") --- I conjecture that you have an object named "F"
(not equal to FALSE) floating around somewhere in your search path.
Remove or rename this, and your ``replace=F'' will work.
But .... ***DON'T DO THAT***!!!
Use FALSE when you mean FALSE. Don't use F. It causes trouble.
(Note: You *cannot* have spurious objects name "FALSE" (and not equal
to FALSE) hanging around; R won't let you. That's why you use FALSE and
not F.)
cheers,
Rolf Turner
######################################################################
Attention:\ This e-mail message is privileged and confid...{{dropped:9}}
______________________________________________
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.