R prog - week 4