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

More along functions? #122

hadley opened this Issue Nov 6, 2015 · 1 comment


None yet
1 participant

hadley commented Nov 6, 2015

I wonder if it would be useful to have:

list_along <- function(x) {
  vector("list", length(x)

rep_along <- function(x, y) {
   rep(x, length.out = length(y))

I find myself reaching for those functions (by analogy to seq_along()) fairly frequently


This comment has been minimized.


hadley commented Nov 6, 2015

Could take multiple arguments and throw an error if they're not the same length?

@hadley hadley closed this in 80c204a Nov 11, 2015

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment