Simple check to determine if code is being run in RStudio with the shiny runtime internal function
Useful links