Obtain an equal length data frame that starts after the last row with NAs column <p>I have a 400 similar length columns with different lengths of <code>NA</code>s at the beginning of columns - How could I obtain an equal row length data frame that begins after the last row with <code>NA</code>s from any column.</p> <pre><code>X&lt;-c(NA,NA,NA,NA,3,4,5,67,8,9,2) Y&lt;-c(NA,NA,2,3,4,1,5,6,7,8,9) s&lt;-data.frame(X,Y) s X Y 1 NA NA 2 NA NA 3 NA 2 4 NA 3 5 3 4 6 4 1 7 5 5 8 67 6 9 8 7 10 9 8 11 2 9 </code></pre> <p>Desired output:</p> <pre><code> X Y 1 3 4 2 4 1 3 5 5 4 67 6 5 8 7 6 9 8 7 2 9 </code></pre>