Order a data frame by slide ID and tissue category, putting the categories in the given order and the "Total" category in the proper place.

order_by_slide_and_tissue_category(d, tissue_categories, .by = "Slide ID")

Arguments

d

A data frame with .by and Tissue Category columns

tissue_categories

A vector of category names in the desired order

.by

First column to sort by

Value

The input, sorted