O'Reilly logo

R Data Analysis Cookbook - Second Edition by Kuntal Ganguly

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Displaying available methods

The following commands are useful to get a list of available methods, or to get the method signature:

> .jmethods(s,"trim") 
[1] "public java.lang.String java.lang.String.trim()" 

The preceding command indicates that the trim method can be invoked on a String object, and it returns a String object:

> # To get the list of available methods for an object 
> .jmethods(s) 
 [1] "public boolean java.lang.String.equals(java.lang.Object)" 
 [2] "public java.lang.String java.lang.String.toString()" 
 [3] "public int java.lang.String.hashCode()" 
 [4] "public int java.lang.String.compareTo(java.lang.String)" 
 [5] "public int java.lang.String.compareTo(java.lang.Object)" 
 [6] "public int java.lang.String.indexOf(int)" 
..... 

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required