[R] cannot coerce class "matchit" into a data.frame"
Piccone, Jason E.
Jason.Piccone at dce.virginia.gov
Wed Jun 15 19:15:59 CEST 2005
Greetings fellow humans,
I am attempting to export a text file after using the MatchIt package to match control with treatment subjects. I attempted to write.table and used the following syntax:
"write.table(social,"shaka.txt",sep=" ",quote=FALSE,row.names=FALSE,col.names= FALSE)"
But received the following error message:
"Error in as.data.frame.default(x[[i]], optional = TRUE) : cannot coerce class "matchit" into a data.frame"
I thought that maybe I had to convert to a data frame, and tinkered with data.frame, as.data.frame, and is.data.frame, but this didn't work (although I could had done it improperly). Please pardon my novice R skills.
Any guidance will be greatly appreciated.
Cheers,
Jason E. Piccone, Ph.D.
Research and Evaluation Specialist
Department of Correctional Education
More information about the R-help
mailing list