In this tutorial you will learn about the R Reference Class and its application with practical example.
R Reference Class
Reference class is basically a S4 class with an environment added to it.
Table Of Contents−
Defining a Reference class
In R, reference classes are defined using the setRefClass()
function.
Syntax:-
1 |
setRefClass("ReffClassName") |
Example:-
1 |
setRefClass("employee") |