title: Creating a vector of means of other groups outside of current row selection
body: <p>Good afternoon all. I'm doing an analysis of latency for certain IP addresses by date. I have a vector that contains the concatenation of the IP address - Date as a character, called "ipdate" and a vector that has a mean of the "ipdate" column called "ipdateMean". This gives me the mean of a specific IP address for a selected day of the week. </p>
  
  <p>What I'm trying to do is compare that against other IP addresses with the same date so that the user can see how their specific IP address selected is comparing against all the others. My thought was to create a separate vector called "ip_not_mean" that calculates the mean of all the other ip addresses for a certain date, but excludes, the mean of the ip addresses from the current row. See below</p>
  
  <pre><code>ipdate                         ipdateMean           ip_not_mean
  123.32.56.78 - 2019.02.02         10                     30
  123.45.67.34 - 2019.02.02         20                     26.6667
  123.45.78.90 - 2019.02.02         30                     23.3333
  123.45.78.56 - 2019.02.02         40                     20
  </code></pre>
  
  <p>I tried this but doesn't appear to be working.</p>
  
  <pre><code>dtCLIPKey$ip_not_mean &lt;- mean(dtCLIPKey$ipdateMean[which(dtCLIPKey$ipdate != dtCLIPKey$ipdate)])
  </code></pre>
  
  <p>Any ideas are appreciated.</p>