How to drop rows with a certain number of NA values?

genius ppl!

I am struggling from dropping rows with a certain number of NA values in my dataset.

I tried to use this code : "delete.na <- function(Table3, n-=0){Table3[rowSums(is.na(Table3)) <= 6]} "

However, error message is as follows: "Error: unexpected '-' in "delete.na <- function(Table3, n-"

unexpected '-' in "delete.na <- function(Table3, n-"

Could you give me any solution?