I am looking for a way to calculate the median in a df with intervals from another data frame.
Example:
df_a <- tibble(values = c (1:30))
df_b <- tibble(lower_limit = c(1, 5, 11, 19),
upper_limit = c(3, 9, 17, 27))
Now I want to mutate a vector named "median" in df_b that computes the median from the data in df_a according to the limits of the intervals in df_b, how can I do that? Regards!