drop dataframe in r code example
Example 1: r remove row dataframe
myData[-c(2, 4, 6), ] # remove rows 2, 4, 6
Example 2: drop a column in r data frame
df <- df %>%
select(-column_to_drop)
myData[-c(2, 4, 6), ] # remove rows 2, 4, 6
df <- df %>%
select(-column_to_drop)