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" #15

Closed rhodocoder closed 3 years ago

rhodocoder commented 3 years ago

Hi! When I try to generate the propensity scores using weightit, I get the following error: Error in deparse1(f[[1]]) : could not find function "deparse1". I'm using R version 3.6.1. This is the code that generates the error:

W.out <- weightit(treat ~ covs, data = arcc_data, method = "ps", estimand = "ATT")

where treat and covs are vectors.

Have you encountered this issue before?

ngreifer commented 3 years ago

This is a common issue with older versions of R. Your version is over a year old and I recommend you upgrade. You should also be able to solve the problem by updating your installation of the backports package. I'm not sure why this has not been automatically fixed, but I'll look into it. For now, I highly recommend you update R. Sorry for the inconvenience.

rhodocoder commented 3 years ago

Thank you, @ngreifer! I did as advised and it works now.