Please I am trying to run R scripts examples provided in the link below on Propensity Score Matching using R provided by Stanford Univerity at http://stanford.edu/~ejdemyr/r-tutorials-archive/tutorial8.html
I am using R version 3.4.1 on Windows 10, 64bit. I copied the code and ran it on my desktop computer with the error reported below the code.
Can someone point me to what is wrong with the syntax and how to fix it. I have tried the little I know about R without success?
Thank you for your time and help.
Script:
ecls_nomiss <- ecls %>% # MatchIt does not allow missing values
select(c5r2mtsc_std, catholic, one_of(ecls_cov)) %>%
na.omit()
Error:
Error in select(., c5r2mtsc_std, catholic, one_of(ecls_cov)) :
unused arguments (c5r2mtsc_std, catholic, one_of(ecls_cov))
Source: http://stanford.edu/~ejdemyr/r-tutorials-archive/tutorial8.html