
Last chance! 50% off unlimited learning
Sale ends in
Given a list of Java object references, instantiate an Array[T]
containing the same list of references, where T
is a non-primitive
type that is more specific than java.lang.Object
.
jarray(sc, x, element_type)
A spark_connection
.
A list of Java object references.
A valid Java class name representing the generic type
parameter of the Java array to be instantiated. Each element of x
must refer to a Java object that is assignable to element_type
.
sc <- spark_connect(master = "spark://HOST:PORT")
string_arr <- jarray(sc, letters, element_type = "java.lang.String")
# string_arr is now a reference to an array of type String[]
Run the code above in your browser using DataLab