Learn R Programming

matRiks (version 0.1.3)

mat_apply: 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 figure mat_apply(Sq1, hrules = "identity", vrules = "identity", mat.type = 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)

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)

Methods (by class)

  • mat_apply(figure): Apply rule to generate a matriks (method)

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

Examples

Run this code
# 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")

Run the code above in your browser using DataLab