Closed wleoncio closed 1 year ago
In R you can use the normalizePath
function to get the full path of a file. If the module file is in your R project, you can simply write:
juliaCall("include", normalizePath("module.jl"))
I would recommend this.
Thanks! I saw the usage of normalizePath()
on your paper, but I ignored it since I assumed this function only served to replace "\" with "/" on Windows path strings. Your code works as expected, cheers!
If I have some Julia functions stored in a module.jl file, this is what I do to import them in R:
If this was part of a package, I know I could use
system.file()
to get the path to the module, but otherwise it's annoying (and unportable) to have to provide the full path tojuliaCall()
.Is there another solution to passing the relative path to module.jl?