f: R --> R means f is a function with domain R and co-domain R.
f(R) stands for set of images of f in R, in this case which is Q.
You have learned how to define continuity for functions f: R--> R and not from R --> Q. You need a basic understanding of topology to do that. That is why I defined it the way I did.