R Function Multiple Inputs Using Split Ring