Export object from R to Scala