[R] cannot coerce class "matchit" into a data.frame"

From: Piccone, Jason E. <Jason.Piccone_at_dce.virginia.gov>
Date: Thu 16 Jun 2005 - 03:15:59 EST

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



R-help@stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html Received on Thu Jun 16 04:13:07 2005

This archive was generated by hypermail 2.1.8 : Fri 03 Mar 2006 - 03:32:42 EST