我有一个数据框,我想从另一个数据框中添加一列。以下代码“有效”:
GOT_TOTALS$PERCENTAGE <- totals
GOT_TOTALS
当我打印时,GOT_TOTALS
我得到带有新列“总计”的数据框。
但我对那个新专栏无能为力。我无法在条形图中绘制它,因为它没有记录值。
当我将表保存回 dashDB 时,它会将每个百分比保存在每个框中。例如,改为这样的新列:
PERCENTAGE
1 14.10625
2 70.48295
3 18.27415
4 37.03030
5 89.40300
6 17.03065
7 34.74760
8 37.05015
9 53.86945
它显示每个框中的所有百分比,如下所示:
c(14.10625, 70.48295, 18.27415, 37.0303, 89.403, 17.03065, 34.7476, 37.05015, 53.86945)
c(14.10625, 70.48295, 18.27415, 37.0303, 89.403, 17.03065, 34.7476, 37.05015, 53.86945)
c(14.10625, 70.48295, 18.27415, 37.0303, 89.403, 17.03065, 34.7476, 37.05015, 53.86945)
c(14.10625, 70.48295, 18.27415, 37.0303, 89.403, 17.03065, 34.7476, 37.05015, 53.86945)
c(14.10625, 70.48295, 18.27415, 37.0303, 89.403, 17.03065, 34.7476, 37.05015, 53.86945)
c(14.10625, 70.48295, 18.27415, 37.0303, 89.403, 17.03065, 34.7476, 37.05015, 53.86945)
等等
有任何想法吗?