[R] vector of zeros and ones

Erik Iverson iverson at biostat.wisc.edu
Thu Nov 20 00:11:24 CET 2008


a <- rep(1, 10000) , see ?rep

hassen62 at voila.fr wrote:
> Dear Rolf, thank you for reply,
> I am interested with non random numbers. To be more precise, I would like to obtain two vectors a and b with a=(1,1,1,......,1,1) and b=(0,0,........,0,0). The length of a and b is 10000.
> Thank you
> 
> ____________________________________________________
> 
> Écoutez gratuitement le nouveau single de Noir Désir et découvrez d'autres titres en affinité avec vos goûts musicaux ! http://musiline.voila.fr/player/generate/4/15/31774/?intitule=Gagnants+%2F+Perdants
> 
> 	[[alternative HTML version deleted]]
> 
> 
> 
> ------------------------------------------------------------------------
> 
> ______________________________________________
> R-help at 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.



More information about the R-help mailing list