While Andre W has given you a solution to your problem, he didn't answer the specific question. I believe the answer is related to this line in ?sink
:
Only prompts and (most) messages continue to appear on the console.
Which implies that install.packages
is sending messages via some other mechanism than stdout