added stream overload for R.