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 <fei0...@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@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. ______________________________________________ R-help@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.