How to display rownames in dataTableOutput element?
1,165 views
Skip to first unread message
Qi Zhao
unread,
May 14, 2014, 11:04:04 AM5/14/14
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to shiny-...@googlegroups.com
I prefer using dataTableOutput to show my dataframe data, but i can't make the rownames visulized with dataTableOutput. I know the tableOutput function can do this but it also round my figures like 0.8812 to 0.88 ( which means only to significant figures were conserved) . can anyone give me some solutions?
Thanks a lot
Yihui Xie
unread,
May 18, 2014, 1:56:16 AM5/18/14
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to Qi Zhao, shiny-discuss
At the moment, you have to bind the row names as a column in the data, e.g.
renderDataTable(cbind(names = names(data), data))
instead of
renderDataTable(data)
Regards,
Yihui
Qi Zhao
unread,
May 18, 2014, 10:56:50 PM5/18/14
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to shiny-...@googlegroups.com, Qi Zhao
Thanks! YiHui, this dose worked for me. I recently found that some one binded checkboxinputs before each row of table output with rendeUIr, which i will consider intergrate rownames with extra style infront of rows. Anyway, thanks again for your kindly reply. :)