https://github.com/cran/ftsa
Raw File
Tip revision: 40311569a57dbc5cee79f7ccfee5ef4cf48006ea authored by Han Lin Shang on 23 August 2018, 05:44:27 UTC
version 4.9
Tip revision: 4031156
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