from_column() can be used in a variety of formatting functions so that values for common options don’t have to be static, they can change in every row (so long as you have a column of compatible option values). Here’s an example where we have a table of repeating numeric values along with a column of currency codes. We can format the numbers to currencies with fmt_currency() and use from_column() to reference the column of currency codes, giving us values that are each formatted as having a different currency.
Let’s summarize the gtcars dataset to get a set of rankings of car manufacturer by country of origin. The n column represents the number of cars a manufacturer has within this dataset and we can use that column as a way to size the text. We do that in the tab_style() call; the from_column() function is used within the cell_text() statement to fashion different font sizes from that n column. This is done in conjunction with the fn argument of from_column(), which helps to tweak the values in n to get a useful range of font sizes.