match.arg(method) Error : stop("'arg' must be NULL or a character vector")

Thank you for your reply! My problem is now solved!