Skip to content

More fexible dimnames #248

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

Open
eliocamp opened this issue Oct 10, 2019 · 2 comments
Open

More fexible dimnames #248

eliocamp opened this issue Oct 10, 2019 · 2 comments

Comments

@eliocamp
Copy link

eliocamp commented Oct 10, 2019

From this twitter conversation.

It would be neat for dimnames not to be limited to character vectors. This would be helpful for gridded data (similar to data cubes).

I don't know enough about R internals to know how this would fare in terms of compatibility with base arrays, though.

@juangomezduaso
Copy link

Perhaps an interesting and useful object to have could be a new version of tbl-cube which had dataframes instead of just character vectors as its "dimensions". This is something already pointed out in a tbl-cube´s code comment.
We have used this idea for the representation in R of the multidimensional aggregated data we have in our Institute (www.ige.eu).
So, this object would have a list of N-dimensional rrays ("measures") and a list of N dataframes each with nrow() equal to the dim() in that axis.
The usefullness of this being to allow the integrity of subseting operations, taking into account the rrays and dataframes at a time.
Obviously, this object would solve the aim of this issue as a particular case of one column (of any arbitrary type) dataframe "dimensions".
I had some reserves about tblcube being too constraining (as I tried to explain in tidyverse/dplyr#4429 (comment) ). It seemed to me to imply that arithmetic calculations should happen inside a tbl-cube or in other case two tbl-cubes would need to be tediously joined in advance.
But now I think that it was a missconception on my part, and that it is not incompatible to be a "measure" of one of these new-tb-cubes and be able to perform arithmetic against any other rray (bradcasting included).

@eliocamp
Copy link
Author

Yes, absolutely. That would be awesome.

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

No branches or pull requests

2 participants