title: R - Can't calculate the mean of a filtered column in data.frame
body: <p>Apparently, I only know how to either calculate the mean or filter the column in R, but never simultaneously.</p>
  
  <p>I have a column in my data.frame archive called "Arithmetic.Mean". If I want, I can calculate the mean of this column by doing:</p>
  
  <p><code>mean(data$"Arithmetic.Mean")</code></p>
  
  <p>Also, I can filter the column and print it by doing:</p>
  
  <p><code>filter(data, "Polut"=="AQ", "City.Name"=="LosAngeles") %&gt;%
  select("Arithmetic.Mean")</code></p>
  
  <p>What I want is to calculate the mean of the "Arithmetic.Mean" column after it being filtered (so, only the values in the rows of this column that coincide with the criteria filtered are being taken account into the mean).</p>