[R] replacement and extraction functions
Eusebio Arenal Gutiérrez
use at eio.uva.es
Mon Nov 8 19:58:21 CET 1999
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)
> fnombres <- list(tratamiento=LETTERS[1:4], veneno=c("I","II","III"))
> veneno.diseno <- data.frame(
+ factor(rep(c(1,2,3,4), rep(12,4))),
+ factor(rep(rep(c(1,2,3), rep(4,3)),4))
+ )
> factor.names(veneno.diseno) <- fnombres
Error in factor.names<-(*tmp*, value = structure(list(tratamiento = c("A",
: unused argument to function
but the following works
> veneno.diseno <- "factor.names<-"(veneno.diseno, fnombres)
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
_._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._
More information about the R-help
mailing list