I have a data frame in R
data.frame(age = 18,19,29,
rate = 1.2,4.5,6.8
sex = "male","female","male")
I would like to get the rate associated with values age =18 and sex = male. Is there a way I can index with those values and be able to do this with any pair of age and sex values.
I can do this in dpylr using filter and select commands but this is too slow for what I'm trying to do