format r code