[Rd] terms.object documentation bug? (PR#8353)
s.wood@bath.ac.uk
s.wood at bath.ac.uk
Mon Nov 28 14:09:42 CET 2005
Full_Name: simon wood
Version: 2.2.0 (and lower)
OS: linux/windows
Submission from: (NULL) (86.135.153.59)
I think that the documentation for the `specials' attribute of a `terms.object'
is not quite right:
specials: If the 'specials' argument was given to 'terms.formula' there
is a 'specials' attribute, a list of vectors indicating the
terms that contain these special functions.
should read something like:
specials: If the 'specials' argument was given to 'terms.formula' there
is a 'specials' attribute, a list of vectors indicating the
variables that contain these special functions.
Here is some example code illustrating the problem:
tf <- terms.formula(y~x+x:z+s(x),specials="s") ## make a `terms' object
attr(tf,"specials") ## documented to index `s' in list of terms
## but in lists of terms, `s' is in position 2, not 4 ....
attr(tf,"term.labels")
colnames(attr(tf,"factors"))
## in lists of variables `s' *is* in position 4...
attr(tf,"variables")
rownames(attr(tf,"factors"))
best,
Simon
More information about the R-devel
mailing list