Work on the package so far; basic implementation for R.