Questions tagged [doparallel]

R package that is a “parallel backend” for the foreach package. It provides a mechanism needed to execute foreach loops in parallel.

453 questions
2
votes
1 answer

ForEach and DoParallel use up all my RAM?

I need to load multiple shape files into my R session. Currently, I am loading each shape file individually. This works, but it takes a long time and only uses 15% of my available CPU. Recently, I tried loading the shape files using ForEach and…
Tbar
  • 141
  • 1
  • 11
2
votes
1 answer

RWeka will not work with caret or possibly %dopar%

I am completing the exercises from Applied Predictive Modeling, the R textbook for the caret package, by the authors. I cannot get the train function to work with methods M5P or M5Rules. The code will run fine…
Ben Hunter
  • 876
  • 1
  • 8
  • 18
2
votes
1 answer

Issue using custom summary function in parallel execution (caret)

I'm trying to use the MAPE as metric to evaluate the performance of a model. In the case of LOOCV and parallel execution all works properly but If I use another resampling method I get this error: Error in { : task 1 failed - “could not find…
amarchin
  • 2,044
  • 1
  • 16
  • 32
2
votes
1 answer

R foreach could not find function "%dopar%"

When I using the doParallel library, I encountered this weird error, the system throws this " Error in { : task 1 failed -could not find function "%dopar%" To be specific, this is what I did library(doParallel) cl <-…
skyindeer
  • 165
  • 2
  • 11
2
votes
2 answers

FOREACH LOOP Error in { : task 1 failed - "could not find function "dbGetQuery""

I am well practiced at simple implementations in R, however I am new to communicating to SQL through R and also parallel programming (no prior experience of these two things before today). I have written the below code with prompts from blogs,…
2
votes
1 answer

R: How to Parallelize multi-panel plotting with lattice in R 3.2.1?

I am new to R programming and wanted to know how to run in parallel plot on 12 trellis objects made with latticepackage. Basically, after a lot of pre-processing steps, I have the following commands: plot(adhd_plot, split = c(1,1,4,3)) #plot adhd…
Neal
  • 328
  • 5
  • 12
2
votes
0 answers

Inconsistent speed improvements with parallel execution in R?

I'm trying some basic things with parallel programming in R. The results have been very inconsistent. My first technique was to use the parSapply() function from the "parallel" library. The results are consistent. As I add more cores to the parallel…
Jerry Zhang
  • 1,352
  • 1
  • 9
  • 20
2
votes
1 answer

ROracle Connection on Worker Nodes // Automated reporting with R Markdown

I am running into several distinct problems while trying to speed up some automated report generation for a large dataset. I'm utilizing R + markdown -> HTML to generate a report, and loop over ~10K distinct groupings for the report accessing the…
Erik
  • 21
  • 2
2
votes
1 answer

doParallel in R - Improvement in speed but CPU is not always utilised to 90%-100%

I am trying to run many linear regressions and diagnostics over them and to speed things up I am using the doParallel package in the R programming language. I have come across though an interesting issue. Although I have seen performance improvement…
stratar
  • 119
  • 7
2
votes
0 answers

When to use parallel programming in R to apply a function to each row

There are many ways to apply a function to each row. Here some methods that I know: method 1 for (i in 1:nrow(data) ) { my_function(data[i,]) } method 2 apply(data,1,my_function) method 3 library(plyr) adply(data,.margins=1,…
dax90
  • 1,088
  • 14
  • 29
2
votes
3 answers

On open, Rstudio starts many processes (started with parallel package in previous session) -- how to kill them?

I have read through this SO question and answers (R parallel computing and zombie processes) but it doesn't seem to quite address my situation. I have a 4-core MacBook Pro running Mac OS X 10.10.3, R 3.2.0, and RStudio 0.99.441. Yesterday, I was…
rcorty
  • 1,140
  • 1
  • 10
  • 28
2
votes
0 answers

%dopar% doesn't work after loading a dataset that comes from a different session

I'm using R on a cluster node with doParallel and foreach packages (OpenMP). I've ran a first script that gave me two objects as results and saved them as RData. On a separate script i load the RData that contains the two objects to be further…
2
votes
0 answers

While creating a random forest using foreach() in R, I am getting error, cannot find randomForest() function

While trying to perform parallel processing in R for creating random forests of 51 trees using 3 cores, I am getting error "Error in randomForest(x, y, ntree = ntree) : task 1 failed - "could not find function "randomForest"" Please help. The…
2
votes
0 answers

foreach R: Calling functions in my own package

I'm in the process of writing an R package. One of my functions takes another function and some other data-related arguments and runs a %dopar% loop using the foreach package. This foreach-using function is used inside the one of the main functions…
Benjamin Allévius
  • 817
  • 1
  • 7
  • 14
1
vote
0 answers

How can I use libraries within a parallelized function with ply?

Novice programmer here. I am trying to use plyr's ldply function and doParallel to speed up a process, but my function uses the libraries terra and sp. My limited understanding of parallel processing is that I have to pass everything that the ldply…
Thomas
  • 11
  • 1