Collect warnings and just warn once.
.collectWarnings(expr, lst = FALSE)
R expression
When TRUE
return a list with
list(object,warnings) instead of issuing the warnings.
Otherwise, when FALSE
issue the warnings and return the
object.
The value of the expression or a list with the value of the expression and a list of warning messages