mat_apply {matRiks}R Documentation

Apply rule to generate a matriks (method)

Description

Apply a rule or a set of rules to a figure to create a matriks

Usage

mat_apply(Sq1, hrules = "identity", vrules = "identity", mat.type = 9)

## S3 method for class 'figure'
mat_apply(Sq1, hrules = "identity", vrules = "identity", mat.type = 9)

Arguments

Sq1

the figure(s) on which the rule should be applied for creating the matriks

hrules

character, the rule(s) to be applied horizontally. Default is identity

vrules

character, the rule(s) to be applied vertically. Default is identity

mat.type

integer, the type of matriks, either 4-cell matriks or 9-cell matriks (Default is 9)

Value

A list of length 7 (4-cell matriks) or of length 12 (9-cell matriks)

An object of class matriks of length 7 (4-cell matriks) or of length 12 (9-cell matriks)

Methods (by class)

Examples

# apply the size rule on a triangle for creating a matriks with 9 cell
my_mat <- mat_apply(triangle(), mat.type = 9, hrule = "size")
# apply the size rule on a triangle for creating a matriks with 9 cell
my_mat <- mat_apply(triangle(), mat.type = 9, hrule = "size")

[Package matRiks version 0.1.3 Index]