R source codes