I have data as follows, including 10 products (a, b, c, ...), and their descriptions (other variables).
I need to report how the summary statistics of other variables (median/proportion) range between products (should be printed as a minimum and maximum for each summary statistic value).
For example:
Which product has the lowest and which the highest median price (need to report only two values, product names do not matter).
Which product has the lowest and highest proportion of "bad" ratings (need to report only two values, product names do not matter).
Is there an easy way to code it? My actual data has 10,000 products and 150 other variables, eyeballing summary tables would kill me.
Data
```{r}
data.frame(
product = rep(letters[1:10], each = 2, times = 500),
price = rnorm(1000, 100, 30),
weight = rnorm(1000, 8, 2),
price_category = rep(c("expensive", "cheap"), each = 4, times = 250),
rating = replicate(1,sample(c("good", "bad"),1000,rep=TRUE)))
```