[R] expand.grid using a repeated vector as a parameter

Prof Brian Ripley ripley at stats.ox.ac.uk
Fri May 2 20:26:51 CEST 2008


?do.call

On Fri, 2 May 2008, Simon Parker wrote:

> Hello.
>
>
> I'm trying to do this (not necessarily 0:1)  :
>
>
> expand.grid ( 0:1, 0:1, 0:1, 0:1, 0:1)
>
> etc..etc.
>
>
> but I want to have control over how many 0:1 are included.
>
>
> Any ideas please ?
>
> Thankyou.
>
>
> Simon Parker
> Imperial College
>
>
>
>
> ---------------------------------
>
> A Smarter Email.
> 	[[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.
>

-- 
Brian D. Ripley,                  ripley at stats.ox.ac.uk
Professor of Applied Statistics,  http://www.stats.ox.ac.uk/~ripley/
University of Oxford,             Tel:  +44 1865 272861 (self)
1 South Parks Road,                     +44 1865 272866 (PA)
Oxford OX1 3TG, UK                Fax:  +44 1865 272595



More information about the R-help mailing list