Package adams.core
Class RObjectHelper
- java.lang.Object
-
- adams.core.RObjectHelper
-
public class RObjectHelper extends Object
Helper class for common R object operations.- Author:
- FracPete (fracpete at waikato dot ac dot nz)
-
-
Constructor Summary
Constructors Constructor Description RObjectHelper()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static String[]
getDimensionNames(org.renjin.sexp.SEXP obj, int dim)
Returns the dimension names for the specified dimension.static int[]
getDimensions(org.renjin.sexp.SEXP obj)
Returns the dimensions of the object.static String[]
vectorToStringArray(org.renjin.sexp.Vector v)
Turns the vector into a string array.
-
-
-
Method Detail
-
getDimensions
public static int[] getDimensions(org.renjin.sexp.SEXP obj)
Returns the dimensions of the object.- Parameters:
obj
- the object to get the dimensions for- Returns:
- the dimensions
-
getDimensionNames
public static String[] getDimensionNames(org.renjin.sexp.SEXP obj, int dim)
Returns the dimension names for the specified dimension.- Parameters:
obj
- the object to get the dimension names fordim
- the dimension index (0-based)- Returns:
- the names, null if failed to obtain
-
vectorToStringArray
public static String[] vectorToStringArray(org.renjin.sexp.Vector v)
Turns the vector into a string array.- Parameters:
v
- the vector to convert- Returns:
- the string array
-
-