[R] arguments in merge() not accepted

R. Michael Weylandt michael.weylandt at gmail.com
Tue Jan 17 04:41:21 CET 2012


What is?

str(data1)
str(data2)

The man page actually states that the data.frame method of the generic
merge() has that argument, but it is not guaranteed that other methods
will have the same argument list. (read ?UseMethod if that sentence
doesn't make sense) In fact, I know xts/zoo don't.

Michael

On Mon, Jan 16, 2012 at 9:11 PM, Lukas Kohl <lukas.kohl at univie.ac.at> wrote:
> dear r-listers,
>
> this may be some rally stupid mistake, but googling didn't help me any further:
>
>> merge(data1, data2, all.x=T)
>
> gives back:
> : Error in merge(data1, data2, all.x = T) :
> :  unused argument(s) (all.x = T)
> [same with any other argument i try to put in..]
>
> although the man page states
>
>>merge(x, y, by = intersect(names(x), names(y)),
>>      by.x = by, by.y = by, all = FALSE, all.x = all, all.y = all,
>>      sort = TRUE, suffixes = c(".x",".y"), incomparables = NULL, ...)
>
> [etc..]
>
> is this a bug in the merge() function or did i miss something important?
>
>
>
> R version 2.12.1 (2010-12-16)
>
> ______________________________________________
> 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