cannot remove empty/NA rows in r

a blank string is not an NA_character_.

identical(NA_character_,"")

You can choose to convert all your empty strings to NA character, and then omit on that basis.

library(tidyverse)

df_ <- tibble(
  a = letters[1:6],
  b = LETTERS[1:6]
)

df_[3, 1] <- ""  # <- have a blank string

df_ <- mutate(
  df_,
  across(
    where(is.character),
    ~ if_else(.x == "", NA_character_, .x)
  )
)

na.omit(df_)
2 Likes