R Programs Coding/Testing