https://github.com/cran/ftsa
Raw File
Tip revision: 592f61af0e8cfd418ea2dfc4fb50aaa23bd972cc authored by Han Lin Shang on 03 January 2019, 07:30:06 UTC
version 5.3
Tip revision: 592f61a
ParseControlStructure.R
ParseControlStructure <- function (control, arguments)
{
	if (!is.list(control))
		stop ("Invalid argument type: control structure must be of type list")

	if (missing(arguments))
		arguments = attributes(control)$names

	for (curname in arguments)
	{
		if (!is.null (control[[curname]]))	##	 if this argument is provided in the control structure:
			eval (parse (text = paste ("eval.parent (substitute(", curname, "<- control$", curname, "), n = 3)", sep = "")))
	}
}
back to top