I have the following data frame, let's call it dfwith the following observations:
id type company
1 NA NA
2 NA ADM
3 North Alex
4 South NA
NA North BDA
6 NA CA
I want to save only those records that do not have NA in the "type" and "company" columns.
id type company
3 North Alex
NA North BDA
I did my best:
df_non_na <- df[!is.na(df$company) || !is.na(df$type), ]
But that did not work.
thank you in advance
source
share