Now passes R CMD check without warnings