How to speed up the package/library loading time in R?
Asked Answered
D

0

2

I have a run_stat.r script that can run in command line such as Rscript anova.r on my ubuntu server:

#load package   
library(ez)  
#run code....  

The problem is that the loading time of ez package would take 2~3 seconds.

Can R preload the package one time, so that it doesn't need to re-load the same package every time I run the script? Any suggestions to speed up the loading time of the package?

Dugan answered 21/3, 2017 at 16:52 Comment(3)
This #10301269 may help you.Tormoria
Thanks. But I've already seen this post. It just "auto-load" the package when R start. What I want is something like the "shared session". I'm not sure if R support something like this?Dugan
How about this? #41570497Lemniscate

© 2022 - 2024 — McMap. All rights reserved.