R programing course assigment 3