SyntaxFix
Write A Post
Hire A Developer
Questions
With this (very helpful) function by Kevin Wright, posted in the tips section of the R wiki, this is easily achieved.
sort(dd,by = ~ -z + b) # b x y z # 4 Low C 9 2 # 2 Med D 3 1 # 1 Hi A 8 1 # 3 Hi A 9 1