title: How to create Quantiles in R, dependend on household income and household expeditures
body: <p>my goal at the moment is to create a graphic of quintiles over the years. Similar to the picture. For example I want to see how the share of housing expenditure of the household income rises over the years for the lowest income quintile. </p>
  
  <p>I create the quintiles for the household income with <code>zz&lt;-do.call("rbind", tapply(f$hinc, f$year, quantile,seq(0,1,1/5)))</code>. My Problem is, that I do not know you to match this information with my dataframe and that I don't know how I match the quintiles of the household income with its housing expenditures. I would like to see the shares that the different income quintiles have to spend on housing expenditure, but I have no Idea how to get there. </p>
  
  <p>Sorry for the vague question. Any help would be appreciated.</p>
  
  <p><a href="https://i.stack.imgur.com/wan3U.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/wan3U.png" alt="enter image description here"></a></p>