r - Frequency table base R vs renderTable Shiny
问题描述
When I run the following code in R, I get the table below.
df<-data.frame(color=rep(c("red", "blue", "green"), 10), numbers=c(1:5, 2:6, 3:7, 4:8, 5:9, 6:10))
table(df)
When I run the code in Shiny, using renderTable, I get what's below. I would prefer having a table set up like the one above because this one takes up a lot of space and is more difficult to read through. Especially since I actually have 30 "numbers" and 7 "colors", which would be 210 unique pairs instead of 30. How can I get the set up of the above table to output in Shiny?
解决方案
推荐阅读
- python - 如何在 arg 函数中传递一个列表以便在 SQL 中读取?
- excel - 如何根据 maatwebsite 版本 3 laravel excel 中的内容制作自动高度行?
- wpf - 引用 App.xaml 的 ResourceDictionary 时出现 IOException
- drools - 如何将过程变量存储到 KIE Workbench 中的全局变量?(jBPM 7)
- r - 如何使用正确的列类型将 CSV 文件导入 R
- linux - 以非 root 用户身份使用 systemd-tmpfiles 创建命名 FIFO
- python - 我应该在 python 中使用什么 HTTP 服务器?
- typescript - 打字稿。为什么功能接口中描述的“返回值”类型没有严格执行?
- sas - 将信息组合成部门向量
- python-3.x - 如何使用 Click 创建连续/无限 CLI?