I am a newbie in R language, so I think i should illustrate this requirement just as Java now we know R can support the OOP, so I want to invoke ClassB method from ClassA
ClassB.java
public class ClassB {
public void printB() {
System.out.println("a");
}
}
ClassA.java
//if they are in the same package, use it directly
//or we must import ClassB explicitly
public class ClassA {
public void invokeB() {
ClassB b = new ClassB();
b.printB();
}
}
so how can i achieve this in R language?