R - Object Oriented Programming

Create the first class :(run the following code and see if you get the same output, then modify and make your own example)

  .

Next, create a new class "AddVariablesTest" based on the class: testClass. We have two ways to achieve the same goal. See the following code and output:

Please avoid the following keywords for slot names: "class" , "comment" , "dim" , "dimnames" , "names" , "row.names" and "tsp" . SetIS function can be used to define inheritance relationship.

Last modified: Monday, 23 June 2014, 3:36 PM