title: NA value not excluded in lm() in R
body: <p>I have a dataframe with Sex (Female=1, Men=0), Race (white=1, non-white=0), among other columns. There are some missing values in both Sex and Race (both are factor variables). Below is a screenshot of the Sex variable distribution.</p>
  <p><a href="https://i.stack.imgur.com/tc7Zg.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/tc7Zg.png" alt="enter image description here" /></a></p>
  <p>However, when I ran the linear regression, no missing values are dropped.
  Below is the regression output. As you can see, for some reason, both 0 and 1 show up for Sex and race. Does that mean R takes &quot;NA&quot; as the baseline? How can I fix the code so that lm() only takes in complete cases?</p>
  <p><a href="https://i.stack.imgur.com/M5Cxv.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/M5Cxv.png" alt="enter image description here" /></a></p>