New to R - do not know how to use If

We have a vintage-but-still-great thread here where people contributed lots of great books and other resources for learning R: What's your favorite intro to R?

There's at least one book out there that specifically targets people transitioning from SPSS: