JLObjR

jobject.spad line 721 [edit on github]

Convenience domain for Julia R objects that are used within Julia, and not directly by the underlying FriCAS Common Lisp. The RCall package has to be installed in Julia. Note that the RCall Julia package uses a similar scheme for Julia R objects to the one of jlFriCAS for JLObjectType references.

#: % -> NonNegativeInteger

from Aggregate

=: (%, %) -> Boolean

from BasicType

~=: (%, %) -> Boolean

from BasicType

coerce: % -> JLObject

from JLObjectType

coerce: % -> OutputForm

from CoercibleTo OutputForm

coerce: Float -> %

coerce(f) coerces f to a Julia R object.

coerce: Integer -> %

coerce(i) coerces the integer i to a Julia R object.

coerce: String -> %

coerce(str) coerces the string str to a Julia R string object.

convert: % -> String

from ConvertibleTo String

copy: % -> %

from Aggregate

elt: (%, Integer) -> %

elt(obj, ind) returns the element at index ind of obj.

elt: (%, Integer) -> JLObject

from JLObjectAggregate

elt: (%, JLSymbol) -> %

elt(obj, sym) returns the property/element sym of obj.

elt: (%, JLSymbol) -> JLObject

from JLObjectAggregate

empty?: % -> Boolean

from Aggregate

empty: () -> %

from Aggregate

eq?: (%, %) -> Boolean

from Aggregate

jlAbout: % -> Void

from JLObjectType

jlApply: (String, %) -> JLObject

from JLObjectType

jlApply: (String, %, %) -> JLObject

from JLObjectType

jlApply: (String, %, %, %) -> JLObject

from JLObjectType

jlApply: (String, %, %, %, %) -> JLObject

from JLObjectType

jlApply: (String, %, %, %, %, %) -> JLObject

from JLObjectType

jlDisplay: % -> Void

from JLObjectType

jlDump: JLObject -> Void

from JLObjectType

jlFieldNames: % -> JLObject

from JLObjectType

jlGetField: (%, JLSymbol) -> JLObject

from JLObjectType

jlGetJuliaIndex: % -> String

from JLObjectType

jlGetProperty: (%, JLSymbol) -> JLObject

from JLObjectType

jlId: % -> Integer

from JLObjectType

jlimref: String -> %

from JLObjectType

jlNames: % -> JLObject

from JLObjectType

jlObject: () -> String

from JLObjectType

jlPropertyNames: % -> JLObject

from JLObjectType

jlRApply: (String, %) -> %

jlRApply(func, robj) applies the R function func form the module __main__ to the R object robj. For example:

jlRApply("abs", (-2)::JLObjR)
jlREval "mtcars";
jlRApply("summary", \%)
jlRApply: (String, %, %) -> %

jlRApply(func, robj1, robj2) applies the R function func form the module __main__ to the R objects robj1 and robj2.

jlRApply: (String, %, %, %) -> %

jlRApply(func, robj1, robj2, robj3) applies the R function func form the module __main__ to the R objects robj1, robj2 and robj3.

jlRApply: (String, %, %, %, %) -> %

jlRApply(func, robj1, robj2, robj3, robj4) applies the R function func form the module __main__ to the R objects robj1, robj2, robj3 and robj4.

jlRApply: (String, %, %, %, %, %) -> %

jlRApply(func, robj1, robj2, robj3, robj4, robj5) applies the R function func form the module __main__ to the R objects robj1, robj2, robj3, robj4 and robj5.

jlRConvert: (String, %) -> JLObject

jlRConvert(type, robj) converts the R object robj to the Julia type ‘type’.

jlRCopy: % -> JLObject

jlRCopy(robj) returns a Julia object copy of the R object robj if possible. Use jlType to know the resulting type of robj if necessary. For example:

robj:=jlREval "mtcars";
jlRCopy robj
jlRDocumentation: String -> JLObject

jlRDocumentation(str) displays the R documentation for the string str. Use 'q' to quit the help viewer.

jlRef: % -> SExpression

from JLObjectType

jlref: String -> %

from JLObjectType

jlREval: % -> %

jlREval(rexpr) evaluates the R expression rexpr in the Julia R environment.

jlREval: JLObject -> %

jlREval(obj) evaluates the expression obj as a Julia object in the Julia R environment. For example:

jlREval "mtcars"
jlRLibrary: String -> Void

jlRLibrary(pkg) loads the R package ‘pkg’ in the Julia R environment.

jlRParse: String -> %

jlRParse(str) parses the R expression str and returns it as a Julia R object. Can be evaluated using the jlREval function for example.

jlRPrint: % -> Void

jlRPrint(robj) prints the R representation of robj.

jlRType: % -> %

jlRType(robj) returns the R type of the Julia R object robj.

jlText: (%, String) -> List String

from JLObjectType

jlType: % -> Symbol

from JLObjectType

jr: JLObject -> %

jr(obj) returns obj as a Julia R object. This is the preferred method. For example:

a:= nrand(10,4)
b := jr(a::JLMatrix(JLObjFloat64))
jlRApply("prcomp", b)
jr: String -> %

jr(str) coerces the string str to a Julia R object using the Julia @R_str macro. Use jlDisplay(robj) to display the R object robj if necessary. For example:

jr "optim(0, $(x -> x-cos(x)), method='L-BFGS-B')"
ret:= jlRCopy \%
qelt(ret,par), qelt(ret,value)
latex: % -> String

from SetCategory

less?: (%, NonNegativeInteger) -> Boolean

from Aggregate

missing?: % -> Boolean

from JLObjectType

more?: (%, NonNegativeInteger) -> Boolean

from Aggregate

mutable?: % -> Boolean

from JLObjectType

nothing?: % -> Boolean

from JLObjectType

qelt: (%, Integer) -> %

qelt(obj, ind) returns the element at index ind of obj.

qelt: (%, Integer) -> JLObject

from JLObjectAggregate

qelt: (%, JLSymbol) -> %

qelt(obj, sym) returns the property/element sym of obj. No checks are done regarding the existence of the sym property. If it does not exist, Julia throws an error.

qelt: (%, JLSymbol) -> JLObject

from JLObjectAggregate

sample: %

from Aggregate

size?: (%, NonNegativeInteger) -> Boolean

from Aggregate

string: % -> String

from JLType

Aggregate

BasicType

CoercibleTo OutputForm

ConvertibleTo String

finiteAggregate

JLObjectAggregate

JLObjectType

JLType

SetCategory