-
Notifications
You must be signed in to change notification settings - Fork 10
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Preload default packages by default #17
Comments
Perhaps you want to do add a configuration map, that fully defines the R environment that you want to have? You even could check, if required packages are installed, and if not, install them. Or you might want to have two functions (load-env config) and (install-load-env config). So in a way instead of needing a R install plus installed packages, you would need only an installed R. You would do something similar to lein project.clj. And you could even make a lein plugin, that would read :clojisr key from project.clj. lein-ring does this for example. |
The problem here is that you don't know which backend is used. Renjin library installing is different. Also sometimes you want to install using dev_tools or install from other servers than cran. I would leave such configuration on the R side. Anyway The original idea is to load all packages which are preloaded by default by R. But it takes time and is not lazy. So I'm not sure if we should do this or not. |
I think what you should do is define a default-config map. And then the user can define his own You also might pass custom init namespace to clojisr, similar to how leiningen can initialize a nrepl connection with some namespace and run an init function. Perhaps also you want to run r init in a future. And the future sets an atom indicating init-complete; and then all R evals would only run after init-complete. The future approach makes sense when developing models in the repl. Then you can do certain stuff while R us still initializing, and dont have to wait foreer for the app to bootstrap. Just an idea... |
Good idea. Let's wait for session management to push this forward. |
I would preload these, as R does:
|
Good point. The question is how they should be loaded. As |
If #94 is done, we can't load above upfront... |
So maybe a function like load-default-packages makes sense. |
Preload default packages by default, ie: stats, base, graphics, datasets, grDevices, probably more.
The text was updated successfully, but these errors were encountered: