From therne@u @end|ng |rom m@yo@edu  Sat Aug 13 13:20:28 2022
From: therne@u @end|ng |rom m@yo@edu (Therneau, Terry M., Ph.D.)
Date: Sat, 13 Aug 2022 06:20:28 -0500
Subject: [Rd] makepredictcall
Message-ID: <ff6a6b$ieem7q@ironport10.mayo.edu>

I'm trying to better understand makepredictcall.? The method for ns() starts with the 
following very cryptic comment and line of code:
 ??? ## check must work correctly when call is a symbol, both for quote(ns) and quote(t1):
 ??? if(as.character(call)[1L] == "ns" || (is.call(call) && identical(eval(call[[1L]]), 
ns))) {

The phrase "t1" appears no where else in the src/library/splines/R, and there is nothing 
relevant in stats/R either? (t1 gets used as a temp variable in 2 subfunctions).
So, what is the purpose of this line of code?

I can see that if a user typed?? zed <- ns, then used 'zed' in their call, that the right 
hand clause would then be true but not the left; but why worry about that case?

Terry T.

 ?PS (The help file isn't very helpful for creating such a method BTW.? It tells why you 
should make one, and what happens if you get it right, but nothing on how.)

-- 
Terry M Therneau, PhD
Department of Quantitative Health Sciences
Mayo Clinic
therneau at mayo.edu

"TERR-ree THUR-noh"

	[[alternative HTML version deleted]]



[Rd] makepredictcall
Therneau, Terry M., Ph.D.