There's been a lot of discussion regarding the significant gap between the lectures from weeks 1 and 2 and Programming Assignment 1 in the R Programming class on Coursera.
While technically you're shown everything you need to know in order to complete the assignment, if you're not familiar with programming concepts (sometimes even if you are), Programming Assignment 1 can feel like you're getting thrown in the deep end of the pool after a 5 minute lesson on how to swim.
I've created a practice programming assignment that should help bridge the gap. It walks you through some basic concepts and ultimately helps you create a function bringing those concepts all together. It does not provide a solution for Programming Assignment 1, but if you can work your way through this guided example, you should have the tools to complete part 1 of assignment 1. Part 2 and 3 are a little more complicated, but build on the ideas from part 1.
The instructions are available in rmd and pdf formats.
Also, once you start working on assignment 1, take a look at the FAQ included at the end of the practice assignment. It addresses probably 80% of the questions people have when they get stuck.