Re: [R] Data matrix of all possible response patterns

From: Henrique Dallazuanna <wwwhsd_at_gmail.com>
Date: Thu, 26 Jun 2008 15:55:33 -0300

Try this also:

t(expand.grid(rep(list(0:1), 10)))

On Thu, Jun 26, 2008 at 3:18 PM, SARAH A DEPAOLI <depaoli_at_wisc.edu> wrote:

> I am looking for a way to generate a data matrix that contains all possible
> response patterns for 10 binary items. This should produce a matrix with 10
> rows (representing 10 items) and 1024 columns (representing 2^10 possible
> response patterns). Does anyone know of code that would produce such a
> matrix?
>
> Thanks!
> Sarah Depaoli
>
> ______________________________________________
> 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

	[[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.

Received on Thu 26 Jun 2008 - 18:59:39 GMT

Archive maintained by Robert King, hosted by the discipline of statistics at the University of Newcastle, Australia.
Archive generated by hypermail 2.2.0, at Thu 26 Jun 2008 - 19:31:04 GMT.

Mailing list information is available at https://stat.ethz.ch/mailman/listinfo/r-help. Please read the posting guide before posting to the list.

list of date sections of archive