vdorie / bartCause

Causal Inference using Bayesian Additive Regression Trees
71 stars 10 forks source link

Change Depends to R >= 4.1 #12

Open krz opened 2 years ago

krz commented 2 years ago

I was unable to install this package on my R 4.0.4 machine and tracked the issue down to line 424 in generics.R file: try_result <- tryCatch(subset <- rep_len(TRUE, dim(result)[length(dim(result))]), error = \(e) e)

\(e) e is a new anonymous function introduced in R 4.1, so either the Depends requirements in DESCRIPTION should be updated or the usage of this new syntax should be avoided (for now). I would opt for changing to old-style functions as 4.1 is still relatively new.

vdorie commented 2 years ago

Thanks for pointing that out. I've changed it back to use the old syntax, but will have to test that it works on R 4.0 more comprehensively.

krz commented 2 years ago

thanks, installation from github now works for me.