r program ex2