Re: [R] Minor Bug in Documentation of merge()

From: Duncan Murdoch <murdoch_at_stats.uwo.ca>
Date: Fri, 25 Jul 2008 14:19:14 -0400

On 7/25/2008 2:13 PM, Roland Rau wrote:
> Dear all,
>
> I would like to point to a minor bug in the documentation of merge().
>
> The documentation (?merge) says
> all logical; all = L is shorthand for all.x = L and all.y = L.
>
> I think the correct description should be
> all logical; all = T is shorthand for all.x = T and all.y = T.

I think it is correct; it says that all = TRUE is the same as all.x=TRUE and all.y=TRUE, and all=FALSE is the same as all.x=FALSE and all.y=FALSE.

Duncan Murdoch

>
> The source file which needs to be fixed is
> src/library/base/man/merge.Rd
>
> To be sure that it hasn't been fixed in the meantime, I checked the
> merge.Rd in R-patched_2008-07-24.tar.gz and R-devel_2008-07-24.tar.gz.
>
> Thanks,
> Roland
>
> Little code example:
>
> > set.seed(12345)
> > df.A <- data.frame(Year=2000:2004, myvar.A=rnorm(5))
> > df.B <- data.frame(Year=1998:2002, myvar.B=rnorm(5))
> > merge(df.A, df.B, all=L)
> Error in merge.data.frame(df.A, df.B, all = L) : object "L" not found
> > merge(df.A, df.B, all=T)
> Year myvar.A myvar.B
> 1 1998 NA -1.8179560
> 2 1999 NA 0.6300986
> 3 2000 0.5855288 -0.2761841
> 4 2001 0.7094660 -0.2841597
> 5 2002 -0.1093033 -0.9193220
> 6 2003 -0.4534972 NA
> 7 2004 0.6058875 NA
> >
>
> ______________________________________________
> 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.



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. Received on Fri 25 Jul 2008 - 18:23:10 GMT

Archive maintained by Robert King, hosted by the discipline of statistics at the University of Newcastle, Australia.
Archive generated by hypermail 2.2.0, at Fri 25 Jul 2008 - 18:32:24 GMT.

Mailing list information is available at https://stat.ethz.ch/mailman/listinfo/r-help. Please read the posting guide before posting to the list.

list of date sections of archive