Skip to content

Resolve tidyverse name clashes #209

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
hadley opened this issue Jan 1, 2018 · 7 comments
Closed

Resolve tidyverse name clashes #209

hadley opened this issue Jan 1, 2018 · 7 comments
Labels
feature a feature request or enhancement

Comments

@hadley
Copy link
Member

hadley commented Jan 1, 2018

  • purrr::pluck
  • readr::guess_encoding
@hadley hadley added the feature a feature request or enhancement label Mar 17, 2019
@dmi3kno
Copy link
Contributor

dmi3kno commented Jun 4, 2020

I presume you want to keep the purrr and readr function names, since those packages are much more used and more developed. The respective function names in rvest need to be deprecated and the new function names need to be proposed instead.

For pluck I can think of the following name alternatives:

  • pluck_at()
  • pick()
  • take_out()
  • pull_out()

For guess_encoding I propose one of

  • infer_encoding()
  • presume_encoding()
  • deduce_encoding()
  • check_encoding()

I can PR deprecation and new function code, if you pick a name.

@hadley
Copy link
Member Author

hadley commented Jun 4, 2020

I think pluck() should probably just be deprecated in favour of some alternative in purrr or elsewhere.

For guess_encoding(), I think the obvious approach would be to tie it more specifically to HTML, i.e. make it html_guess_encoding().

@dmi3kno
Copy link
Contributor

dmi3kno commented Jun 4, 2020

I am all for deprecation, but rvest::pluck() is used in the package, so there will have to be an internal alternative, unless you want to introduce dependence on purrr, which I would love to avoid.

html_guess_encoding() is a great idea. Let me try and PR deprecation code.

@hadley
Copy link
Member Author

hadley commented Jun 4, 2020

If it's used internally, we'd leave the function and just not export it. (Which would mean we'd need to give it a new name so we could offer a deprecated version).

@dmi3kno
Copy link
Contributor

dmi3kno commented Jun 4, 2020

Yepp, please pick a name for internal function ))

@hadley
Copy link
Member Author

hadley commented Jun 4, 2020

pluck_map()?

@beanumber
Copy link

I would love to see rvest::pluck() disappear. I run into this particular conflict regularly.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature a feature request or enhancement
Projects
None yet
Development

No branches or pull requests

3 participants