####################################################################################################################################
################################## newWindowForPlot ################################################################################
# >>
newWindowForPlot <- function(plot) {
if( is.null(dev.list()) ) {
# print("No Active Dev")
# print("Activating rStudioDev")
dev.new()
# print("rStudioDev Activated sucessesfully...")
# print( "Creating new Dev for new Plot" )
dev.new()
# print( "New Dev created sucessfully for new Plot" )
} else {
devList = dev.list()
dev.set( devList[ length(devList) ] )
# print( paste0( "The current Dev is ", dev.cur() ) )
# print( "Creating new Dev for new Plot" )
dev.new()
# print( "New Dev created sucessfully for new Plot" )
}
}
# <<
################################## newWindowForPlot ################################################################################
####################################################################################################################################
# 1 -> noActiveDev
# 2 -> rStudioDev
# 3 -> ----------
# 4 -> popUpDev
# 5 -> popUpDev
####################################################################################################################################
################################## Help Code #######################################################################################
# >>
# newWindowForPlot()
# <<
################################## Help Code #######################################################################################
####################################################################################################################################
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.