## set path to be searched for Ttools:
frame_files <- lapply(sys.frames(), function(x) x$ofile)
frame_files <- Filter(Negate(is.null), frame_files)
path <- dirname(frame_files[[length(frame_files)]])
if (is.na(path)) {
print("select the file with the Ttools toolbox!")
path <- file.choose()
path <- unlist(strsplit(path,"Ttool"))[1]
}
path
frame_files <- lapply(sys.frames(), function(x) x$ofile)
frame_files
function(x) x$ofile
