how to remove na from row in r code example
Example 1: r remove na from dataset
new_df <- na.omit(df, c("myvar1", "myvar2")) # Remove NA on specific variables
Example 2: r remove row dataframe
myData[-c(2, 4, 6), ] # remove rows 2, 4, 6
new_df <- na.omit(df, c("myvar1", "myvar2")) # Remove NA on specific variables
myData[-c(2, 4, 6), ] # remove rows 2, 4, 6