[R] How to speed up R program
MacQueen, Don
macqueen1 at llnl.gov
Thu Mar 17 01:22:48 CET 2016
You can start with
?Rprof
which can help you find out what steps in your calculations are taking the
most time.
Depending on what, exactly, you're doing, look for places where you're
using a data frame when a matrix would serve the purpose. Data frames have
more overhead than matrices.
Sarah Goslee's suggestion to avoid growing in place is a good one.
-Don
--
Don MacQueen
Lawrence Livermore National Laboratory
7000 East Ave., L-627
Livermore, CA 94550
925-423-1062
On 3/14/16, 2:32 PM, "R-help on behalf of Ragia ."
<r-help-bounces at r-project.org on behalf of ragia11 at hotmail.com> wrote:
>
>
>
>
>Dear group
>I have two R sessions running on Ubuntu 14.0x server , and I found that
>my program will take too long time to be finished( months...!), I used
>top command and found that cpu usage is 21.3%.
>
>the server is Enterprise SP-64 - 64G E5-1630v3 SoftRaid 2x2 TB Server . 6
>core
>
>how can I speed the program, kindly I need tutorial or book chapter that
>helps..
>thanks in advance
>Ragia
>
>
>______________________________________________
>R-help at r-project.org mailing list -- To UNSUBSCRIBE and more, see
>https://stat.ethz.ch/mailman/listinfo/r-help
>PLEASE do read the posting guide
>http://www.R-project.org/posting-guide.html
>and provide commented, minimal, self-contained, reproducible code.
More information about the R-help
mailing list