Before posting on the r-help list I did run Rprof(). In my posting I asked
for help with re-writing the specific script into sapply() or
foreach()/doParallel format.
Thanks anyway for your time and suggestions,
Lexo
On Thu, Jan 24, 2019 at 12:38 AM Eric Berger wrote:
> Charles writes about savi
Charles writes about saving execution time by eliminating redundancies.
If you see redundancies related to calling a time-consuming function
multiple times with the same arguments, a very easy way to speed up your
program is to memoise the functions using the package memoise.
HTH,
Eric
On Wed,
See inline.
> On Jan 23, 2019, at 2:17 AM, Aleksandre Gavashelishvili
> wrote:
>
> I'm trying to speed up a script that otherwise takes days to handle larger
> data sets. So, is there a way to completely vectorize or paralellize the
> following script:
>
>*# k-fold cross valida
I'm trying to speed up a script that otherwise takes days to handle larger
data sets. So, is there a way to completely vectorize or paralellize the
following script:
*# k-fold cross validation*
df <- trees # a data frame 'trees' from R.
df <- df[sample(nrow(df)), ] # randomly shuf
4 matches
Mail list logo