This is very cool indeed until you want to use more than 32 or so terms and
most operating systems force you to go to floating point. 

> x=sample(2^34,1000)
Error in sample(2^34, 1000) : invalid 'x' argument
In addition: Warning message:
In sample(2^34, 1000) : NAs introduced by coercion



jholtman wrote:
> 
> Are you just trying to obtain a combination from 25 possible terms?
> If so, then just sample the number you want and convert the number to
> binary:
> 
>> sample(33554432,100)
>   [1]  6911360  5924262 23052661 12888381 25831589 16700013 24079278
> 33282839 12751862 26086726 31363494  7118320 21866536  4212929
>  

David Katz
www.davidkatzconsulting.com

-- 
View this message in context: 
http://www.nabble.com/how-to-subsample-all-possible-combinations-of-n-species-taken-1%3An-at-a-time--tp22911399p22919597.html
Sent from the R help mailing list archive at Nabble.com.

______________________________________________
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.

Reply via email to