Skip to content
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

New linter to recommend sequence() base R function #2595

Open
Bisaloo opened this issue Jun 7, 2024 · 4 comments · May be fixed by #2618
Open

New linter to recommend sequence() base R function #2595

Bisaloo opened this issue Jun 7, 2024 · 4 comments · May be fixed by #2618
Labels
feature a feature request or enhancement

Comments

@Bisaloo
Copy link
Contributor

Bisaloo commented Jun 7, 2024

As an alternative to unlist(lapply(x, seq_len)).

A proof of concept implementation is available at 32049af and I'd be happy to turn it into a PR, and add tests, etc.

Anything I should take into account first? Should it be merged into seq_linter()?

@Bisaloo
Copy link
Contributor Author

Bisaloo commented Jun 7, 2024

It's not a super common pattern but some hits in the wild: https://github.com/search?q=org%3Acran+%2Funlist%5C%28%5Bsl%5Dapply%5C%28%5B%5E%2C%5D%2B%2C+seq_len%2F&type=code

@IndrajeetPatil
Copy link
Collaborator

I would let others weigh in, but I would personally prefer to subsume this into seq_linter().

@AshesITR
Copy link
Collaborator

AshesITR commented Jun 7, 2024

I agree with merging this into seq_linter().

@MichaelChirico
Copy link
Collaborator

3rd-ed :)

@IndrajeetPatil IndrajeetPatil added the feature a feature request or enhancement label Jun 7, 2024
@Bisaloo Bisaloo linked a pull request Jun 21, 2024 that will close this issue
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

Successfully merging a pull request may close this issue.

4 participants