
Assign an Integer Value to a Julia Variable
julia_assign_int.Rd
This function wraps `JuliaCall::julia_assign` to assign a value from R to a Julia variable, and then explicitly casts the variable to the `Integer` type in Julia.
Details
The function first assigns the value from R to a variable named `x` in the Julia session using `JuliaCall::julia_assign`. It then forces Julia to cast the variable to the `Integer` type using Julia's `Integer()` constructor.
Note: This function assumes that the `value` provided is compatible with Julia's `Integer` type. If it is not, an error will be thrown by Julia.
Examples
if (FALSE) { # \dontrun{
julia_assign_int("x", 3.5) # Will be cast to 3L in Julia
JuliaCall::julia_eval("x") # Returns 3 (as Integer in Julia)
} # }