mat2rle: mat2rle

Description Usage Arguments Details Value Examples

View source: R/mat2rle.R

Description

function that writes the organism cell matrix with golly pattern into rle file

Usage

1
mat2rle(organism, fileName)

Arguments

organism

object of class organism

fileName

name of the new file with the pattern

Details

Accepts an object of class matrix and file name and saves the matrix in the rle file format (with the given gile name)

Value

None. Saves the organism matrix into file

Examples

1
2
3
4
5
6
7
8
9
# Save glider organism object into rle file named CoolOrganism.rle

glider_logical <- matrix( data = c(F,T,F,
F,F,T,
T,T,T), nrow = 3, byrow = T)

glider <- organism(cells = glider_logical)

mat2rle(glider, "CoolOrganism.rle")

fransilvion/REvolution documentation built on Nov. 4, 2019, 12:57 p.m.