rewrite hasData, change Rd docs