R LanguageImplement State Machine Pattern using S4 Class

Download R Language for free


Finite States Machine concepts are usually implemented under Object Oriented Programming (OOP) languages, for example using Java language, based on the State pattern defined in GOF (refers to the book: "Design Patterns").

R provides several mechanisms to simulate the OO paradigm, let's apply S4 Object System for implementing this pattern.

Related Examples

Parsing Lines using State Machine