rename R.repeatN and revert argument order

As discussed in #626