Errors in argument parsing for R