On Jun 1, 2014, at 10:49 AM, Bill Bentley wrote: > The following works as it should... > >> both<-rbind(females,males) > >> both > > workshop gender q1 q2 q3 q4 > > 1 1 f 1 1 5 1 > > 2 2 f 2 1 4 1 > > 3 1 f 2 2 4 3 > > 5 1 m 4 5 2 4 > > 6 2 m 5 4 5 5 > > 8 2 m 4 5 5 5 > > > > Next I changed the objects males and females so they had different numbers > of variables and used rbind again and got an error which I expected. > > > >> both <- rbind(females, males) > > Error in rbind(deparse.level, ...) : > > numbers of columns of arguments do not match > > > > Next I attached the 'reshape' library and tried to use rbind.fill but as the > code below shows, it does NOT work. The library seems to load ok (no error > message) and appears in the list when I use the library() command. > > > >> library("reshape")
Try: help(pack="reshape") Do you see a listing for rbind.fill? I don't. > >> both <- rbind.fill(females, males) > > Error: could not find function "rbind.fill" If you cannot find a function then try: ??rbind.fill > > The book I'm following does this the same way and it works for them. Maybe they loaded a different package? Or perhaps one that attached the package that has rbind.fill? > I've > re-downloaded and installed the reshape package but to no avail. Not sure > what to do. Can't find an answer in help. I'm a brand new R user. Any > suggestions what I'm doing wrong? Thanks! My suggestion ( which is only slightly disingenuous, since I do know what package has the forenamed function), is to "learn to fish": # Either: install.packages("sos") library(sos) findFn("rbind.fill") # Or: Google it. > > > > > > > > > > > > > [[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. David Winsemius Alameda, CA, USA ______________________________________________ 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.