powerjoin icon indicating copy to clipboard operation
powerjoin copied to clipboard

joining by row name

Open moodymudskipper opened this issue 1 year ago • 1 comments

The tidy approach discourages row names but they still happen, should we provide a way to match by row names ? base::merge allows it using by = "row.names" or by = 0.

I don't like the former since it's confused with column names, the latter is not explicit and is coerced to character on a by vector so I don't love it either.

We might use by = "*row*".

I thought we might have a helper by_row() which is either recognised by NSE or is just NA with a class and printing method, but used in vectors the attribute/class will be lost by c() and the NSE handling would look awful.

So I think "row" it is.

moodymudskipper avatar Sep 27 '22 07:09 moodymudskipper

Use case: https://stackoverflow.com/questions/73833284/r-merging-data-frame-and-concatenating-values/73833671#73833671

moodymudskipper avatar Sep 27 '22 08:09 moodymudskipper