title: How would I only work with one row to get quantiles of that specific row in "R"
body: <p>I want to get the top 5 and 10 percent + bottom 5 and 10 percent of a data set but for a specific row &quot;TOTINCP&quot;</p>
  <p><strong>Current Code:</strong></p>
  <pre class="lang-r prettyprint-override"><code>
  library(&quot;tidyverse&quot;)
  data1 &lt;- read_csv(&quot;1986Census.csv&quot;, col_names = TRUE)
  attach(data1)
  ls(data1)
  
  dropped &lt;- subset(data1, 26 &lt;= AGEP &amp; AGEP &lt;= 64 &amp; (TOTINCP &gt;= 0 &amp; TOTINCP &lt;= max(TOTINCP)) &amp; MARSTP != 1 &amp; MARSTP != 5)
  
  #male and female after dropped observations
  male &lt;- subset(dropped, SEXP == 2)
  female &lt;- subset(dropped, SEXP == 1)
  incomeMale &lt;- c(male, TOTINCP) 
  quantile(incomeMale, 0.05,0.10,0.95,0.90)
  </code></pre>
  <p><code>incomeMale &lt;- c(male, TOTINCP)</code> &lt;&lt;&lt;&lt; this line is meant to get me all my TOTINCP values in a vector so I can go through that and get the quantiles but what it goes through my entire male dataset and does that for everything... I need the male part as I am not trying to get the quantiles for the entire dataset just the males.</p>
  <p>I've tried making <code>incomeMale</code> a subset but it does the same thing, does anyone have. solution? Thankyou!</p>