R/makeDialogs.R

#############################################
#
# 			Call Wide to Long & Long to Wide Dialogs
#
#############################################

.getWtLDialog <- function(){ # Ensures that 2 copies of the dialog do not exist simultaneously
	if(!exists(".WtLDialog")){ # checks to see if a dialog already exists
		.WtLDialog <- new(WideToLong) # if not, creates one
		.WtLDialog$setLocationRelativeTo(.jnull())
		assign(".WtLDialog",.WtLDialog,globalenv())	# and registers it	
	}
	return(.WtLDialog) 
}

.getLtWDialog <- function(){ # Ensures that 2 copies of the dialog do not exist simultaneously
	if(!exists(".LtWDialog")){ # checks to see if a dialog already exists
		.LtWDialog <- new(LongToWide) # if not, creates one
		.LtWDialog$setLocationRelativeTo(.jnull())
		assign(".LtWDialog",.LtWDialog,globalenv())	# and registers it	
	}
	return(.LtWDialog) 
}

Try the DeducerReshape package in your browser

Any scripts or data that you put into this service are public.

DeducerReshape documentation built on May 2, 2019, 5:20 p.m.