delete rows in r code example
Example 1: r remove row dataframe
myData[-c(2, 4, 6), ] # remove rows 2, 4, 6
Example 2: r remove row names
rownames(data) <- c()
Example 3: r remove inf values
df <- df[!is.infinite(rowSums(df)),]
myData[-c(2, 4, 6), ] # remove rows 2, 4, 6
rownames(data) <- c()
df <- df[!is.infinite(rowSums(df)),]