Hier ist, was die ursprüngliche Datenrahmen wie folgt aussieht:Finding Prozentsatz basiert auf zwei Säulen
PLACEMENT SIZE COST
1 placement1 LARGE 1838128.00
58 placement1 MEDIUM 10962048.00
117 placement1 SMALL 2622851.00
175 placement1 UNKNOWN 443.00
2 placement2 LARGE 598.00
59 placement2 MEDIUM 24358.00
118 placement2 SMALL 571802.00
176 placement2 UNKNOWN 1706.00
3 placement3 LARGE 8.00
60 placement3 MEDIUM 22.00
119 placement3 SMALL 502388.00
177 placement3 UNKNOWN 762.00
Wie erstellen Sie eine Spalte, die den Prozentsatz der Größe von PLATZIERUNG zeigt?
Ich mag es so am Ende aussehen:
PLACEMENT SIZE COST PERCENTAGE
1 placement1 LARGE 1838128.00 11.9
58 placement1 MEDIUM 10962048.00 71.1
117 placement1 SMALL 2622851.00 17.0
175 placement1 UNKNOWN 443.00 0.0
2 placement2 LARGE 598.00 0.1
59 placement2 MEDIUM 24358.00 4.07
118 placement2 SMALL 571802.00 95.54
176 placement2 UNKNOWN 1706.00 0.29
3 placement3 LARGE 8.00 0.0
60 placement3 MEDIUM 22.00 0.0
119 placement3 SMALL 502388.00 99.84
177 placement3 UNKNOWN 762.00 0.16
Jede Hilfe wäre toll, danke! Ich kann es mit der Bibliothek repro.table nicht herausfinden, obwohl ich das Gefühl habe, dass es das ist, was ich benutzen soll.
Som e mögliche Duplikate: http://StackOverflow.com/Q/16716269/ und http://StackOverflow.com/Q/22231357/ und http://StackOverflow.com/Q/25134347/ und http://StackOverflow.com/q/24247462/und http://stackoverflow.com/q/31394227/ – Frank