finished basic R wrapper facilities, added simple example