Join GitHub today
GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.
Sign upfeature request : transpose(keep.rownames = T)? #1886
Comments
|
This should be easy to implement and an important addition. |
|
could you elaborate with sample input & output?
lists don't really have a "row names" attribute...
…On Mar 8, 2017 6:45 AM, "skanskan" ***@***.***> wrote:
This should be easy to implement and an important addition.
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
<#1886 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AHQQdT_v8cy-pMpmR4pTa2uAN090SEZDks5rjpTagaJpZM4KcVr3>
.
|
|
Imagine you have a data.table with several columns, such as this toy example. and you want to calculate several things to summarize the different variables.
Something similar to this: But I having a result with colnames and rownames:
|
|
if the example input & output in the original feature request is not clear enough let me know and I will edit. I agree that a list does not have row.names. The function is also intended for data.frames and data.tables however. When you transpose these objects, their variable names would become row.names, in which the |
|
This could have been useful in this SO post -- instead of needing the helper function This comes at a sort of general thing that I run into a lot of needing to split the named result of a routine into separate columns because the names are important (most salient and consistent example being when I run |
transposing up to now required this:
, so the
transformfunction has potential to cut this short.It has however no
keep.rownames = Targument (or something similar), so the variable names disappear:what I hoped to see was something like this: