Skip to content

Should zip_n() be transpose? #128

Description

@hadley

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions