library(tidyverse)
reprex for you to reproduce:
library(tidyverse) tibble( x1 = c(1, 2, NA, NA, 5), y1 = c(4, 3, NA, NA, 7), x2 = c(NA, NA, 6, 7, NA