Skip to content

replacement and extraction functions

2 messages · Brian Ripley, Eusebio Arenal Gutiérrez

#
On Mon, 8 Nov 1999, [iso-8859-1] Eusebio Arenal Gutiérrez wrote:

            
I am sorry, I don't see your defn of factor.names<-().  The only difference
of which I am aware (try the V&R2 on-line R Complements or even the R FAQ)
is that in R the last argument of a replacement function _must_ be named
`value'. That is not true in S, nor of factor.names<-() in S-PLUS 4.5.

(If you are copying S-PLUS functions into R, you might want to check on the
copyright position.)

  
    
#
Is there any documentation about replacement and extraction functions in R,
these fuenctions don't work as in S.

Example with funtion factor.names (of S+ 4.5r2)
+ factor(rep(c(1,2,3,4), rep(12,4))),
+ factor(rep(rep(c(1,2,3), rep(4,3)),4))
+ )
Error in factor.names<-(*tmp*, value = structure(list(tratamiento = c("A",
: unused argument to function

but the following works
Thanks for the help

*************************************************************
*                 Eusebio Arenal Guti?rrez                  *
*   Departamento de Estad?stica e Investigaci?n Operativa   *
*      _\|/_      Universidad de Valladolid                 *
*      (o o)               Espa?a                           *
*---oOO-(_)-OOo-----------------------------------,,,-------*
*                      use at eio.uva.es            (o o)      *
*---------------------------------------------oOO-(_)-OOo---*
*                 Eusebio Arenal Guti?rrez                  *
*     Department of Statistics and Operational Research     *
*                 University of Valladolid                  *
*                           Spain                           *
*************************************************************



-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
r-help 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-help-request at stat.math.ethz.ch
_._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._