lass='co'># or if .var is either NA or constant within them)</span>
<span class='co'># Also note - this will fill in using CURRENT-period</span>
<span class='co'># data first (if available) before looking for lagged data.</span>
<span class='fu'><a href='https://rdrr.io/r/utils/data.html'>data</a></span>(<span class='no'>SPrail</span>)
<span class='fu'><a href='https://rdrr.io/r/base/sum.html'>sum</a></span>(<span class='fu'><a href='https://rdrr.io/r/base/NA.html'>is.na</a></span>(<span class='no'>SPrail</