I have one excel sheet that contains two tables separated by two empty rows (NAs) that is similar to this:
x <- c("Speed", "Fuel_level", "OpHours", NA, NA, "Warning", "TempSensor", "TripDistance")
y <- c("kmph", "liter", "hr", NA, NA, "msg", "C", "km")
df <- data.frame(x,y)
Is there a function in R where I can split this data frame on NAs into two data frames to look like this?
x y
1 Speed kmph
2 Fuel_level liter
3 OpHours hr
x y
1 Warning msg
2 TempSensor C
3 TripDistance km