You will run out of memory. 2*3^198 is about 5e95 rows and 4GB of RAM can probably only hold about 5e8 rows. --------------------------------------------------------------------------- Jeff Newmiller The ..... ..... Go Live... DCN:<jdnew...@dcn.davis.ca.us> Basics: ##.#. ##.#. Live Go... Live: OO#.. Dead: OO#.. Playing Research Engineer (Solar/Batteries O.O#. #.O#. with /Software/Embedded Controllers) .OO#. .OO#. rocks...1k --------------------------------------------------------------------------- Sent from my phone. Please excuse my brevity.
yan <y.j...@ucl.ac.uk> wrote: >thanks petr, >what if I got 200 elements, so I have to write expand.grid(x1=1, >x2=1:2, >x3=1:3, x4=1:3, x5=1:3....x200=1:3))? > >Many thanks > >yan > >-- >View this message in context: >http://r.789695.n4.nabble.com/function-for-grouping-tp4324436p4327812.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. ______________________________________________ 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.