-
Notifications
You must be signed in to change notification settings - Fork 991
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
feature 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
transform
function has potential to cut this short.It has however no
keep.rownames = T
argument (or something similar), so the variable names disappear:what I hoped to see was something like this:
The text was updated successfully, but these errors were encountered: