[R] cannot coerce class ""function"" to a data.frame

Jim Holtman jholtman at gmail.com
Wed Oct 30 09:56:15 CET 2013


you never defined "data" and "data" is a function in the "base".

type in "data" just before "merge" and see what is output (debuggung 101)

Sent from my iPad

On Oct 30, 2013, at 4:38, hsin-fei tu <fei0315 at gmail.com> wrote:

> Hello:
> 
> I use the "egonet" function and have a problem
> 
> idx <- sapply(mats,index.egonet)
> 
> idx <- as.data.frame(t(idx))
> 
> idx <- cbind(idx,filename=rownames(idx))
> 
> data <- merge(data,idx,by="filename")
> 
> 
> 
> cannot coerce class ""function"" to a data.frame
> 
> 
> can someone please help me with this problm?
> 
> 
> Thank you!!
> 
>    [[alternative HTML version deleted]]
> 
> ______________________________________________
> R-help at r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
> and provide commented, minimal, self-contained, reproducible code.



More information about the R-help mailing list