dplyover icon indicating copy to clipboard operation
dplyover copied to clipboard

Don't drop the `.` when used in `.names`

Open brshallo opened this issue 4 years ago • 1 comments

I can tell you put a lot of thought into how to handle .names and that figuring out an intuitive way of doing this in the different contexts of {dplyover} is tricky. I was planning on opening a few issues for discussion on potential changes to naming conventions.

  • In dplyr::across() the argument .cols becomes {.col}, similarly I think for dplyover::across2() that .xcols should become {.xcol}
  • The dplyover::over() cases are more ambiguous because would suggest that .x should stay {.x} -- this may not be bad as this is the default behavior when .x is an unnamed atomic vector anyways... but could also see how this might cause problems. So might consider changing argument name away from .x e.g. .xinputs , .xparams, .xargs , .xvals ?

But yeah, not sure how to do... just feel maintaining . prefix when specified in .names may be preferred.

brshallo avatar May 21 '21 15:05 brshallo

Thanks for opening this issue. When I started working on {dplyover} I built over upon an older version of dplyr::across which still used {col} in the the .names argument. This changed and now {.col} is the recommended way, while {col} still works.

I totally agree that {dplyover} should adapt the naming conventions of {dplyr}. So all functions in the over-across family should use the . prefix. To keep things simple, and because the package is still in an experimental state, I think it would be ok to introduce a breaking change by making the prefix a requirement (and drop support for {x} etc.).

TimTeaFan avatar May 22 '21 14:05 TimTeaFan