Code Monkey home page Code Monkey logo

Comments (4)

frankier avatar frankier commented on June 20, 2024

I have given some information on my current workaround here: JuliaInterop/RCall.jl#480

from condapkg.jl.

cjdoris avatar cjdoris commented on June 20, 2024

Such a tutorial probably belongs with RCall not with CondaPkg. However I'll happily add links to "upstream tutorials" (on RCall/PythonCall/etc) to the README.

from condapkg.jl.

frankier avatar frankier commented on June 20, 2024

Sounds reasonable. I will try to do that as a next step after getting this PR merged which should make the integration more straight forward.

from condapkg.jl.

frankier avatar frankier commented on June 20, 2024

@ParadaCarleton

I wonder whether you might be able to help test this? If you are able to test/review it might help with getting PRs merged.

The first step is to try this PR from RCall: JuliaInterop/RCall.jl#496

pkg> add "https://github.com/frankier/RCall.jl.git#preferences-r-installation"

The second is to run this (you will have to add Libdl + PreferenceTools to your project for now)

using CondaPkg
using Preferences
using Libdl
using PreferenceTools

function locate_libR(Rhome)
    @static if Sys.iswindows()
        libR = joinpath(Rhome, "bin", Sys.WORD_SIZE==64 ? "x64" : "i386", "R.dll")
    else
        libR = joinpath(Rhome, "lib", "libR.$(Libdl.dlext)")
    end
    return libR
end

CondaPkg.resolve()
target_rhome = "$(CondaPkg.envdir())/lib/R"
PreferenceTools.add(
    "RCall",
    "Rhome" => target_rhome,
    "libR" => locate_libR(target_rhome)
)

e.g. put it in a file setup_rcondapkg.jl and run as part of your top level project julia --project=. setup_rcondapkg.jl. Then you should be able to add this to CondaPkg.toml

[deps]
r-mypkg = ""
r = ""

The second step is a bit annoying but I guess it should be possible to streamline it to some extent e.g. adding an extension package to RCall.jl.

from condapkg.jl.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.