From wdunlap at tibco.com  Fri Feb  5 18:49:13 2016
From: wdunlap at tibco.com (William Dunlap)
Date: Fri, 5 Feb 2016 09:49:13 -0800
Subject: [Rd] smooth()'s output attribute 'endrule'?
Message-ID: <CAF8bMcbwQC=K9Ph8k4xcRnETW=N897rRA70YKOnuq8ZMdUmK_A@mail.gmail.com>

What is the point of the 'endrule' attribute of smooth()'s return value?

For the simpler smooths (not involving 'S'?) it is value of the endrule
argument, for more complicated smooths it is the endrule not asked for (the
choices are 'Tukey' and 'copy').  For kind="S", it is not in the return
value, no matter what the input is.

kinds <- c("3RS3R", "3RSS", "3RSR", "3R", "3")
sapply(kinds, function(k)attr(smooth(sin(1:10),kind=k), "endrule"))
#  3RS3R    3RSS    3RSR      3R       3
# "copy"  "copy"  "copy" "Tukey" "Tukey"
sapply(kinds, function(k)attr(smooth(sin(1:10),kind=k, endrule="Tukey"),
"endrule"))
#  3RS3R    3RSS    3RSR      3R       3
# "copy"  "copy"  "copy" "Tukey" "Tukey"
sapply(kinds, function(k)attr(smooth(sin(1:10),kind=k, endrule="copy"),
"endrule"))
#  3RS3R    3RSS    3RSR      3R       3
#"Tukey" "Tukey" "Tukey"  "copy"  "copy"


Bill Dunlap
TIBCO Software
wdunlap tibco.com

	[[alternative HTML version deleted]]



[Rd] smooth()'s output attribute 'endrule'?
William Dunlap