Hands-On Programming with R: Write your own Functions and Simulation (Paperback)
very pleasant writing style, made didactically well, very suitable for beginners. Who wants to learn programming with R, which I can only recommend the book to get you started.