[R] Problem with rbind.fill
Pascal Oettli
kridox at ymail.com
Mon Jun 2 06:54:59 CEST 2014
Hello,
Yes, but... "rbind.fill" is a function of the "plyr" package.
HTH,
Pascal
On Mon, Jun 2, 2014 at 2:49 AM, Bill Bentley <valuetrain at gmail.com> 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")
>
>> both <- rbind.fill(females, males)
>
> Error: could not find function "rbind.fill"
>
>
>
> The book I'm following does this the same way and it works for them. 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!
>
>
>
>
>
>
>
>
>
>
>
>
> [[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.
--
Pascal Oettli
Project Scientist
JAMSTEC
Yokohama, Japan
More information about the R-help
mailing list