[R-sig-eco] randomization

Etienne Laliberté etiennelaliberte at gmail.com
Sat Jul 17 23:42:24 CEST 2010


Not totally sure I understand your question, what I got from your
message is that you're at the design stage and just want R to give you a
random sequence to randomly assign treatments to sampling units?

If so, just assign an ID number (e.g. 1 to 960), then use function
sample (without replacement):

sample(1:960)

Cheers

Etienne


Le samedi 17 juillet 2010 à 16:46 -0300, shylock holmes a écrit :
> Hi all, I am totally new to R - never used it and just beginning to read through the websites and posted notes to learn what and how R does things. So for what I am planning on doing, I have no clue really, and wanted to ask for some advice.
>  
> I have 3 insect species that I am planning on letting oviposit one egg onto different diets (or hosts): there are 4 types of food with 4 variants of each food type (i.e., original food type a, artificially created food type a, artificial food type a with substitute x, artificial food type a with substitute y, and so on for all other food types); I am also planning that each food type with all variants is replicated 20 times per insect species (in total 960 eggs with 320 eggs per insect species with 20 eggs on 16 different food variants as above). How can I randomize the order of food items and what insect species lays eggs on what food type the best way by using R?
>  
> Any suggestions are greatly appreciated!!!
>  
> Many thanks
>  		 	   		  
> _________________________________________________________________
> 
> 
> 	[[alternative HTML version deleted]]
> 
> _______________________________________________
> R-sig-ecology mailing list
> R-sig-ecology at r-project.org
> https://stat.ethz.ch/mailman/listinfo/r-sig-ecology



More information about the R-sig-ecology mailing list