packPotts | R Documentation |
transform Potts model data from integer matrix to raw vector and vice versa.
packPotts(x, ncolor) inspectPotts(raw) unpackPotts(raw)
x |
integer matrix containing Potts model data. Colors are coded
from one to |
ncolor |
integer scalar, number of colors. |
raw |
vector of type |
for packPotts
a vector of type "raw"
.
for inspectPotts
a list containing components
ncolor
, nrow
, and ncol
.
for unpackPotts
an integer matrix.
x <- matrix(sample(4, 2 * 3, replace = TRUE), nrow = 2) x foo <- packPotts(x, ncolor = 4) foo inspectPotts(foo) unpackPotts(foo)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.