title: Average of two columns (both not presenting NA's) conditional over a time period
body: <p>I am trying to obtain the descriptive statistics for specific variables (presented as columns) in a data frame. I am interested in obtaining the mean and standard deviation of two of the variables (polindex and log(gdp)) but I have two restrictions. </p>
  
  <p>First, I need to make my estimations <strong>only</strong> for cases where both polindex and log(gdp) contain data at the same time (i.e. I need to exclude the observations for both variables any time one or the two of them present NA's). This is in order to have the same base number of observations in both estimations.  </p>
  
  <p>Second, I need to make my estimations only for the years in the range 1960-2000, this is, the observations for any year lower or greater than these should be excluded.</p>
  
  <p><a href="https://i.stack.imgur.com/A4vzh.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/A4vzh.png" alt="enter image description here"></a></p>