How to locate a structured region of data inside of a not structured data frame in R?
问题 I have a certain kind of data frames that contain a subset of interest. The problem is that this subset, is non consistent between the different data frames . Nonetheless, in a more abstract level , follows a general structure: a rectangular region inside the data frame. example1 <- data.frame(x = c("name", "129-2", NA, NA, "acc", 2, 3, 4, NA, NA), y = c(NA, NA, NA, NA, "deb", 3, 2, 5, NA, NA), z = c(NA, NA, NA, NA, "asset", 1, 1, 2, NA, NA)) print(example1) x y z 1 name <NA> <NA> 2 129-2 <NA