Are there settings in Rstudio that will prevent it from stalling when printing a large object?

sometimes I absentmindedly want to print out an object that I just created (like a huge matrix). unfortunately this causes Rstudio to stall, as printing all that data to the console is a near impossible task. I sometimes can ctrl-c to stop the print, but only if I do it quickly enough. Is there a setting in Rstudio that will cause a print to fail if its taking too long?

We've all done that. :grin:

This won't help with matrices, but if you are dealing with dataframes, then tibbles (or data.tables) only print a limited no. of rows precisely for this reason.

My real enemy is JSON. I try to stick with str() and occasionally use max levels where needed. That or head. Never print :grimacing: