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

Should zip_n() be transpose? #128

Closed
hadley opened this Issue Nov 11, 2015 · 0 comments

Comments

Projects
None yet
1 participant
@hadley
Member

hadley commented Nov 11, 2015

x[["a"]][[1]] is equivalent to zip_n(x)[[1]][["a"]], in the same way z[a,b] is equivalent to t(z)[b, a].

That suggests there might be interesting generalisations of zip_n() that correspond to aperm() - i.e. maybe you want to switch the order of the 2nd and 3rd depths. What is the data frame equivalent of this operation? select()?

I think we can probably remove zip2() and zip3() as they don't seem that useful (since they're not symmetric)

Haskell's transpose: https://hackage.haskell.org/package/base-4.8.1.0/docs/Data-List.html#v:transpose

@jennybc

@hadley hadley closed this in e66b605 Nov 12, 2015

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