find row with na r

# Create a sample dataframe
df <- data.frame(
  x = c(1, 2, NA, 4, 5),
  y = c("a", "b", "c", NA, "e")
)

# Find rows with NA values
na_rows <- which(rowSums(is.na(df)) > 0)
na_rows