ngreifer / WeightIt

WeightIt: an R package for propensity score weighting
https://ngreifer.github.io/WeightIt/
102 stars 12 forks source link

Error in deparse1(f[[1]]) : could not find function "deparse1" #24

Closed meldallal closed 2 years ago

meldallal commented 3 years ago

Hello there, I am trying to use weightit function, but I keep getting this error. Error in deparse1(f[[1]]) : could not find function "deparse1"

This is my code: w.out <- weightit(mentalH1 ~ covs, data = core_1617, s.weights=core_1617$DISCWT, estimand = "ATE", method = "ps",agg.fun= "range")

I found a similar discussion: https://github.com/ngreifer/WeightIt/issues/15, and I updated the installation of backports package and restart R, but still running to the same problem. FYI, I am working on R version 3.5.2

Please advise. Thank you, Mohammed

ngreifer commented 3 years ago

Those steps should work, and if they don't, then this a problem with the backports package and not with WeightIt. Try re-installing WeightIt after updating backports. I also recommend you update R; you're using a version that's over 2 years old.