upgrade to roxygen2 4.0 doco and fix for factors