Questions tagged [rcall]

a package for Julia Statistics. It is a pure-Julia package that enables calling R from Julia.

RCall is a package for Julia Statistics. It is written in pure and enables calling from .

http://juliastats.github.io/RCall.jl/

13 questions
3
votes
1 answer

Passing NA to R using JULIA RCall package

I have some problem with passing NA in an array to R for imputeTS package. assume I have this array: a = Any[1, 2, 3, NaN, 5] and I want to pass it to this: R""" b <- na_seadec($a, algorithm = "kalman", find_frequency = TRUE, maxgap = Inf) """ NaN…
weera
  • 884
  • 1
  • 10
  • 21
2
votes
0 answers

Code runs on local Julia but breaks on computer cluster when adding RCall package

I have a code that runs well on local julia but fails when I try running them on a cluster. It breaks when I do Pkg.add(“RCall”). Before I run Julia I have already loaded module Julia/1.8.2 and R/4.2.1-foss-2022a. Then I cd to where my julia project…
Hongyu
  • 183
  • 5
2
votes
0 answers

How to display pictures by ggplot2, RCall and Julia in jupyter?

I tried to use ggplot2 in julia by RCall, like example below using DataFrames using RCall df = DataFrame(randn(10,2),:auto) @rlibrary ggplot2 @rlibrary ggsci ggplot(df, aes(x=:x1, y=:x2))+geom_point() It works well in the REPL, but in jupyter…
2
votes
0 answers

Fail to importing R libraries to Julia 1.4 using RCall

Imported R libraries to julia using RCall (@rlibrary) cause "Segmentation Error" during run them (not at start the application). I am using latest version of both R (3.6.3) and Julia (1.4.1). Is there any solution? Problem persists for any library,…
weera
  • 884
  • 1
  • 10
  • 21
2
votes
0 answers

Julia's execution using Juno gets blocked because of not being able to access the console

In another question: Juno IDE for Julia, how to interact? One of the answers stated: You can't enter commands into the console in Juno--that's for displaying output. Commands can be submitted from within the editor by setting your cursor in the…
1
vote
1 answer

How to use the R".." string macro with R code encoded in a String

I am trying to implement a sort of @Rinclude macro to include R code written in a file in Julia using the RCall Julia package, but I have trouble making the R"..." string macro recognise the code encoded in the string that I have read: RCode =…
Antonello
  • 6,092
  • 3
  • 31
  • 56
1
vote
1 answer

Why am i getting an error when trying to work with ggplot in Julia?

I call the ggplot package in Julia as shown in this website: https://avt.im/blog/2018/03/23/R-packages-ggplot-in-julia. I use the package as shown in that website and everything works fine. Now i plot the average marginal effects in Julia using the…
Jack
  • 813
  • 4
  • 17
1
vote
1 answer

Garchfit in R called from Julia: Multivariate data inputs require lhs for the formula

I'm trying to call the R function garchFit from Julia using Rcall. When I do things directly in R, all is well: the following works library("fGarch") library("rugarch") spxData <- read.csv(file = 'SPXlogreturns.csv') y = spxData$y …
1
vote
1 answer

How to install an R package using RCall.jl

I am using RCall.jl in Julia and am getting errors because the code I want to run is relying on some R packages which I have yet to install. Is there a way (like with PyCall.jl and Conda.jl) that I can install the required R package though the…
logankilpatrick
  • 13,148
  • 7
  • 44
  • 125
1
vote
1 answer

Import Julia UnitRange to R using RCall

I would like to import the Julia array including unit range below to R: Any[1:6, 9, 12, 15] What I exactly want is something equivalent to this in R: c(1:6, 9, 12, 15) Any help will be appreciated.
weera
  • 884
  • 1
  • 10
  • 21
1
vote
1 answer

Import data vector from julia to R using RCall

Assume I have a Julia data array like this: Any[Any[1,missing], Any[2,5], Any[3,6]] I want to import it to R using RCall so I have an output equivalent to this: data <- cbind(c(1,NA), c(2,5), c(3,6)) Note: the length of data is dynamic and it may…
weera
  • 884
  • 1
  • 10
  • 21
1
vote
0 answers

Fail to install RCall - Julia package

Following RCall's documentation, I ran Pkg.add("RCall") which looked to be working. Then, running using RCall gave: WARNING: could not import StatsModels.Formula into RCall ERROR: LoadError: RCall not properly installed. Please run…
JKHA
  • 1,800
  • 11
  • 28
1
vote
0 answers

Import a R script (from current working directory) into Julia using @rimport

I have a locally saved R program, layout.R , which is in my current directory (where I am initialising Julia). I was wondering if it possible to load this as a library using Julia's 'rimport' wrapper? I know that for Python I have to run: …
user2589273
  • 2,379
  • 20
  • 29