advanced r 2nd pdf