r - remove inf value in datafarme code example Example: r remove inf values df <- df[!is.infinite(rowSums(df)),]