It uses the RSTUDIO_CONSOLE_WIDTH environment variable, if set. Otherwise it uses the width option. If this is not set either, then 80 is used.
RSTUDIO_CONSOLE_WIDTH
width
console_width()
Integer scalar, the console with, in number of characters.