I have data that looks like this:
tc td
3 400
3 430
4 200
4 240
5 120
3 470
...
and so on. I would like to generate a boxplot(using default plotters or ggplot2) that groups data by the variable in the first column (tc), such that there is one box for each, 3,4,5 and so on. Data might not be restricted to 3,4,5 and I would prefer not having a hardcoded solution that asks me to split by the number in tc and plot each one individually.
I haven't found much online that gives me good examples (either the examples are hardcoded, or don't show how to split, or the example data is not immediately present, and I don't know whether that example fits my needs)