conversion | R Documentation |

Converts between binary matrix and pattern representations of response patterns or knowledge states.

as.pattern(R, freq = FALSE, as.letters = FALSE, as.set = FALSE) as.binmat(N.R, uniq = TRUE, col.names = NULL, as.logical = FALSE)

`R` |
an indicator matrix of response patterns or knowledge states. |

`N.R` |
either a (named) vector of absolute frequencies of response
patterns; or a character vector of response patterns or knowledge states;
or a |

`freq` |
logical, should the frequencies of response patterns be reported? |

`uniq` |
logical, if |

`as.letters` |
logical, return response patterns as combinations of letters. |

`as.set` |
logical, return response patterns as set of sets. |

`col.names` |
column names for the state or response matrix. |

`as.logical` |
logical, return logical matrix of states. |

`as.pattern`

returns a vector of integers named by the response
patterns if `freq`

is `TRUE`

, else a character vector. If
`as.set`

is `TRUE`

, the return value is of class `set`

.

`as.binmat`

returns an indicator matrix. If `as.logical`

is
`TRUE`

, it returns a logical matrix.

`blim`

, `set`

in package `sets`

.

data(DoignonFalmagne7) as.pattern(DoignonFalmagne7$K) as.pattern(DoignonFalmagne7$K, freq = TRUE) as.pattern(DoignonFalmagne7$K, as.letters = TRUE) as.pattern(DoignonFalmagne7$K, as.set = TRUE) dim(as.binmat(DoignonFalmagne7$N.R)) dim(as.binmat(DoignonFalmagne7$N.R, uniq = FALSE)) ## Knowledge structure as binary matrix as.binmat(c("000", "100", "101", "111")) as.binmat(set(set(), set("a"), set("a", "c"), set("a", "b", "c"))) as.binmat(c("000", "100", "101", "111"), as.logical = TRUE)

Embedding an R snippet on your website

Add the following code to your website.

For more information on customizing the embed code, read Embedding Snippets.