update R API
add test scripts