switch to roxygen 4
fix warnings
move tests around, and update functions for categorical varialbes