From p.dalgaard@biostat.ku.dk  Sun Jan 28 15:22:17 2001
From: p.dalgaard@biostat.ku.dk (Peter Dalgaard BSA)
Date: 28 Jan 2001 16:22:17 +0100
Subject: [Rd] variables in nls (PR#829)
In-Reply-To: Uwe Ligges's message of "Sun, 28 Jan 2001 16:01:27 +0100 (CET)"
References: <Pine.LNX.4.21.0101281543001.943-100000@rechenknecht.statistik.uni-dortmund.de>
Message-ID: <x2zogbzopi.fsf@blueberry.kubism.ku.dk>

Uwe Ligges <ligges@statistik.uni-dortmund.de> writes:

> Looks like a problem (?) with all.vars():
> 
>  temp <- matrix(1:4, 2)
>  all.vars(temp ~ 3) # OK
> [1] "temp"
> 
>  all.vars(temp[1, ] ~ 3) # Here is the problem. 
> [1] "temp" ""
> 
>  all.vars(temp[1, TRUE] ~ 3) # works again
> [1] "temp"
> 
> 
> If this is expected (?), because of an implicitly given empty variable
> name ([1, ThisOne]) for example, nls() has to be fixed:
> 
> 
> Just insert after the lines
>  
>   varNames <- varNames[is.na(match(varNames, names(start),
>         nomatch = NA))]
> 
> the line 
> 
>   varNames <- varNames[varNames != ""]

Thanks for the workaround, Uwe. In the longer run it is probably
better to make all.vars skip empty variable names.
-- 
   O__  ---- Peter Dalgaard             Blegdamsvej 3  
  c/ /'_ --- Dept. of Biostatistics     2200 Cph. N   
 (*) \(*) -- University of Copenhagen   Denmark      Ph: (+45) 35327918
~~~~~~~~~~ - (p.dalgaard@biostat.ku.dk)             FAX: (+45) 35327907
-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
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
_._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._


[Rd] variables in nls (PR#829)
Peter Dalgaard BSA