I am imputing missing values by `missRanger` and it takes too long as I have 1000 variables. I tried to use parallel computing, but it does not make the process faster. Here is the code 

```
library(doParallel)
cores=detectCores()
cl <- makeCluster(cores[1]-1) 
registerDoParallel(cl)
library(missRanger)
train[1:lengthvar] <- missRanger(train[1:lengthvar], pmm.k = 3, num.trees = 100)
stopCluster(cl)

```

I am not sure what to add to this code to make it work.