Dear all, what is the best way to do this? end = c(2,6,4) I neeed: expand.grid(0:end[1],0:end[2],0:end[3]) Best regards JL _________________________________________________________________ Confira v?deos com not?cias do NY Times, gols direto do Lance, videocas[[elided Hotmail spam]]
Henrique Dallazuanna
2008-Mar-13 19:40 UTC
[R] FW: Os resultados do seus comandos de email
Try: do.call(expand.grid, sapply(end, seq, from = 0)) On 13/03/2008, lamack lamack <lamac_k at hotmail.com> wrote:> > > > Dear all, what is the best way to do this? > > end = c(2,6,4) > > I neeed: expand.grid(0:end[1],0:end[2],0:end[3]) > > Best regards > > > JL > _________________________________________________________________ > Confira v?deos com not?cias do NY Times, gols direto do Lance, videocas[[elided Hotmail spam]] > > ______________________________________________ > 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. >-- Henrique Dallazuanna Curitiba-Paran?-Brasil 25? 25' 40" S 49? 16' 22" O