ck37/varimpact

Error: there is no package called 'varimpact', after process has started

saleonard opened this issue · 3 comments

I finished making the dataset and varimpact seems to install and load correctly, but every time I get an error "there is no package called 'varimpact' after the process has clearly started. (See below.) Any troubleshooting thoughts? Thanks so much.

> library(varimpact)
> result = varimpact(Y = dat$y,
+                       A_names = setdiff(names(dat), c("a", "w")),
+                       data = dat[, !colnames(dat) %in% "y"],
+                       Q.library = Q_lib, 
+                       g.library = g_lib,
+                       impute = "median",
+                       verbose = TRUE,
+                       quantile_probs_factor = NULL,
+                       V = 4)  
Future backend set to the following:
multiprocess:
- args: function (..., envir = parent.frame(), workers = 8)
- tweaked: TRUE
- call: future::plan("multiprocess", workers = 8)
Removed 0 variables due to high missing value proportion.
Processing factors. Start count: 21 
No factors dropped due to lack of variation.
Factors with missingness: 0 
Dropped 0 factors due to the missingness threshold.
Factors with missingness: 0 
End factor count: 21 Indicators: 23 Missing indicators: 
Finished pre-processing variables.

Processing results:
- Factor variables: 21 
- Numeric variables: 0 

Cross-validation fold breakdown:
   Fold
Y       1     2     3     4
  0 17075 17075 17075 17074
  1   569   568   568   568
Estimating variable importance for 21 factors.
Error: there is no package called 'varimpact'
ck37 commented

That is a strange one - I unfortunately have never seen this error for varimpact or any other R package.

My suspicion is that it is some change in the future or future.apply package in more recent versions, which might be a bug or something else that was modified. You might try turning off the parallelization temporarily to see if that resolves the problem. I wonder if installing an older version of future or future.apply might fix it as well.

What version of R are you using, and what operating system? One other possibility I'm wondering about it is if it's related to the system PATH variable and that when future is trying to start another R process it's using a different R version or installation compared to what is currently running.

It does seem strange. I'll retry without parallelization. This is R 4.0.2 on Windows Server 2012. It's not a great server but other one is down. My plan C is to try moving it to a GCP project, and ask that R be updated on this server.

Thanks so much -- this is really helpful to troubleshoot better.

No parallelization worked!! I'll just do that in full data, will only take longer - no big problem. Thanks again.