Shared R codes