| showGroups | R Documentation | 
Print first group of a grouped data.frame, then prompt user to either print the next group or quit. Group order is determined by dplyr::group_rows.
showGroups(df, i = 1, n = 1, max_rows = 50, interactive = TRUE)
| df | A *grouped* data.frame | 
| i | (integer(1), default 1) Index of the group to be printed. | 
| n | (integer(1), default 1) How many groups to show at once? | 
| max_rows | integer(1) Maximum number of rows to print (Default: 50). | 
| interactive | (default: TRUE) Should the function wait for a command prompt to show the next group? | 
Prints a group (or n groups, if parameter n is set) of a grouped data.frame df. The group order is determined by dplyr. If interactive is TRUE, there is a console prompt to either print the next group or quit. If interactive is FALSE, a single group is printed, with the group index specified by parameter i.
Helen Lindsay
df <- data.frame(Col1 = rep(c("A", "B"), 2), Col2 = 1:4)
df <- dplyr::group_by(df, Col1)
# Print the second group.  Use interactive = TRUE to print each
# group interactively
showGroups(df, i = 2, interactive = FALSE)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.