Description Usage Arguments Value Author(s) References See Also Examples
This is a display method for data.frames to show ragged key/grouping variables,
similar to ftable
| 1 2 3 4 | 
| indt | The input  | 
| keys | The variables to be used as keys or grouping variables | 
| blank | The character to print to show nesting. Defaults to "". | 
| x | The object to be printed. | 
| ... | Not used. | 
A list with a "ragged" object and the sorted data.table. The custom
print method displays the "ragged" result, but allows further use of data.table.
Ananda Mahto
https://stackoverflow.com/q/41324110/1270695
| 1 2 3 4 5 6 7 8 9 | before= data.frame(C1= c(rep("A", 5), rep("L", 2)),
C2= c("B", rep("E", 3), rep("K", 2), "L"),
C3= c("C", "F", rep("H", 5)),
C4= c("D", "G", "I", rep("J", 4)), 
stringsAsFactors = FALSE)
ragged(before, c("C1", "C2"))
ragged(before, names(before), ":")
ragged(head(ggplot2::diamonds, 30), c("cut", "color"), ":")[, mean(price), .(cut, color)]
 | 
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.