Error in na.fail.default: missing values in object - but no missing values
<p>I am trying to run a lme model with these data:</p>

<pre><code>tot_nochc=runif(10,1,15)
cor_partner=factor(c(1,1,0,1,0,0,0,0,1,0))
age=runif(10,18,75)
agecu=age^3
day=factor(c(1,2,2,3,3,NA,NA,4,4,4))
dt=as.data.frame(cbind(tot_nochc,cor_partner,agecu,day))
attach(dt)

corpart.lme.1=lme(tot_nochc~cor_partner+agecu+cor_partner *agecu, 
                  random = ~cor_partner+agecu+cor_partner *agecu |day, 
                  na.exclude(day))
</code></pre>

<p>I get this error code:</p>

<blockquote>
  <p>Error in na.fail.default(list(cor_partner = c(1L, 1L, 2L, 1L, 1L, 1L,  : 
    missing values in object</p>
</blockquote>

<p>I am aware there are similar questions in the forum. However, in my case:  </p>

<ul>
<li>cor_partner has no missing values;  </li>
<li>the whole object is coded as a factor (at least from what the Global Environment shows).</li>
</ul>

<p>I could exclude those NA values with an na.action, but I'd rather know why the function is reading missing values - to understand exactly what is happening to my data.</p>