title: Find 10% highest and lowest values, trim all columns in R
body: <p>I have a dataset with different columns.
  I want to find the 10% highest and lowest values in the RES column and delete all corresponding values.</p>
  <p>So far I have this:</p>
  <pre><code>    library(DescTools)
  par(mfcol=c(1,2)); 
  Tdata=Trim(data$res, trim=0.1)
  
  Tdata = as.data.frame(Tdata)
  hist(data$res); hist(Tdata)
  View(cbind(data$res,Tdata))
  </code></pre>
  <p>It seems to me that this does the job in deleting the 10% highest and lowest values but it does so by creating a new variable. Instead, I want to delete all corresponding rows from the dataset.</p>
  <p>In this <a href="https://drive.google.com/drive/folders/18Vu5YCP3b9uoBGKfcelIASF2vGf_KdKx?usp=sharing" rel="nofollow noreferrer">GoogleDrive</a> folder you can find the dataset.</p>
  <p>Thank you in advance</p>