Learn R Programming

sfcurve (version 1.0.0)

sfc_validate,sfc_sequence-method: Validate the sequence

Description

Validate the sequence

Usage

# S4 method for sfc_sequence
sfc_validate(p, by = "sfc_2x2")

# S4 method for character sfc_validate(p, by = "sfc_2x2")

Value

A logical scalar.

Arguments

p

An sfc_sequence object or a character string. If it is a character string, rotation of zero is assigned to the first letter.

by

One of sfc_2x2, sfc_3x3_peano and sfc_3x3_meander.

Details

It is mainly used to validate a seed sequence whether they follow the forward-left-right rule.

Examples

Run this code
try(sfc_validate("LLLLL"))
try(sfc_validate(sfc_sequence("IIIII", rot = c(0, 90, 180, 270, 0), 
        universe = sfc_universe(SFC_RULES_2x2))))

Run the code above in your browser using DataLab