From P.Dalgaard at biostat.ku.dk  Fri Oct 12 18:59:50 2007
From: P.Dalgaard at biostat.ku.dk (Peter Dalgaard)
Date: Fri, 12 Oct 2007 18:59:50 +0200
Subject: [Rd] no visible binding
In-Reply-To: <050851DE-BDC9-4F82-8EA9-B05B9DC60AA7@uiuc.edu>
References: <050851DE-BDC9-4F82-8EA9-B05B9DC60AA7@uiuc.edu>
Message-ID: <470FA806.8010203@biostat.ku.dk>

roger koenker wrote:
> Could someone advise me about how to react to the message:
>   
I'd try putting quotes in

model.extract(m, "response")

(and also in

model.extract(m, "weights")

even though you're not seeing the complaint on that one).


> * checking R code for possible problems ... NOTE
> slm: no visible binding for global variable 'response'
>
> from R CMD check SparseM    with
> * using R version 2.6.0 Under development (unstable) (2007-09-03 r42749)
>
> The offending code looks like this:
>
> "slm" <-
> function (formula,  data, weights, na.action, method = "csr",
>      contrasts = NULL, ...)
> {
>      call <- match.call()
>      m <- match.call(expand.dots = FALSE)
>      m$method <- m$model <- m$x <- m$y <- m$contrasts <-  m$... <- NULL
>      m[[1]] <- as.name("model.frame")
>      m <- eval(m, sys.frame(sys.parent()))
>      if (method == "model.frame")
>          return(m)
>      Terms <- attr(m, "terms")
>      weights <- model.extract(m, weights)
>      Y <- model.extract(m, response)
>      X <- as.matrix.csr(model.matrix(Terms, m, contrasts))
>      fit <- {
>          if (length(weights))
>              slm.wfit(X, Y,  weights, method, ...)
>          else slm.fit(X, Y,  method, ...)
>      }
>      fit$terms <- Terms
>      fit$call <- call
>      attr(fit, "na.message") <- attr(m, "na.message")
>      class(fit) <- c(if (is.matrix(Y)) "mslm", "slm")
>      fit
> }
>
>
> url:    www.econ.uiuc.edu/~roger            Roger Koenker
> email    rkoenker at uiuc.edu            Department of Economics
> vox:     217-333-4558                University of Illinois
> fax:       217-244-6678                Champaign, IL 61820
>
> ______________________________________________
> R-devel at r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/r-devel
>   


-- 
   O__  ---- Peter Dalgaard             ?ster Farimagsgade 5, Entr.B
  c/ /'_ --- Dept. of Biostatistics     PO Box 2099, 1014 Cph. K
 (*) \(*) -- University of Copenhagen   Denmark          Ph:  (+45) 35327918
~~~~~~~~~~ - (p.dalgaard at biostat.ku.dk)                  FAX: (+45) 35327907



[Rd] no visible binding
Peter Dalgaard