ripley@stats.ox.ac.uk
2002-Feb-25 15:50 UTC
[Rd] delete.response() incorrectly handles terms-objects (PR#1328)
On Mon, 25 Feb 2002, David Meyer wrote:> Prof Brian D Ripley wrote: > > > > Thanks, fixed now. > > > > Why were you calling delete.response on an object with no response, BTW? > > I used it in predict.svm(), and the terms-object contained in the svm > model just happens to have no response for the ``one-class > classification'' if svm was called e.g. by: > > m <- svm(~a+b). > > Because of the second line in delete.response() > > if (length(f) == 3) > f[[2]] <- NULL > > handling the no-response case, I believed I was allowed to use > delete.response() without checking for this.Indeed you were. But delete.response does change the terms object in that case, and I suspect it should either return it unchanged (as S does) or give an error.> > I wonder whether delete.response should not be a no-op in that case (it is > > in S), if there is any reason to handle it at all. > > So people will have to check for it before using delete.response() - > this is probably more secure indeed.-- Brian D. Ripley, ripley@stats.ox.ac.uk Professor of Applied Statistics, http://www.stats.ox.ac.uk/~ripley/ University of Oxford, Tel: +44 1865 272861 (self) 1 South Parks Road, +44 1865 272860 (secr) Oxford OX1 3TG, UK Fax: +44 1865 272595 -.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.- r-devel mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html Send "info", "help", or "[un]subscribe" (in the "body", not the subject !) To: r-devel-request@stat.math.ethz.ch _._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._
Apparently Analagous Threads
- delete.response() incorrectly handles terms-objects (PR#1327)
- under certain conditions, model.matrix appears to lack one (PR#648)
- FW: [R] Problems with url/download and http_proxy (PR#1689)
- readline 4.2 shows R has (fatal) incorrect declarations. (PR#913)
- Use of 'any' in 3.2.1 if ... else example is incorrect (PR#1576)