I have a large dataframe with a categorical variable. I would like to pull values from the subset of the dataframe ascribing to each value of the categorical variable and sa