R/zzz.R

Defines functions .onAttach

.onAttach <- function(libname, pkgname) {

	gsubfn.engine <- getOption("gsubfn.engine")
	# if gsubfn.engine was not set to "R" then check if tcltk can be used
    if ( ! identical(gsubfn.engine, "R") ) {
		tcltk.ok <- isTRUE(capabilities()[["tcltk"]]) && 
						requireNamespace("tcltk", quietly = TRUE)
		if ( ! tcltk.ok ) {
			options(gsubfn.engine = "R")
			packageStartupMessage('Could not load tcltk.  Will use slower R code instead.')
		}
	}

}

Try the gsubfn package in your browser

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

gsubfn documentation built on May 1, 2019, 8:50 p.m.