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

From: Uwe Ligges <ligges_at_statistik.uni-dortmund.de>
Date: Sat 18 Jun 2005 - 22:07:53 EST

Piccone, Jason E. wrote:

> 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.

"MatchIt" is a special package, so you might have to contact the author / maintainer directly.

[You can save() a MatchIt object, of course, and load() it afterwards, if this is sufficient.]

Uwe Ligges

> 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



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 Sat Jun 18 22:27:31 2005

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