also removes a chunk of code that would never be run because of some contradictory logic in the if statements. a simplified version is below. I removed the inner if statement which only printed a message
if (is.null(date){
....
if (!is.null(date){
....
}
}
also removes a chunk of code that would never be run because of some contradictory logic in the if statements. a simplified version is below. I removed the inner if statement which only printed a message