On Mon, 8 Nov 1999, [iso-8859-1] Eusebio Arenal Gutiérrez wrote:
Is there any documentation about replacement and extraction functions in R, these fuenctions don't work as in S.
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.)
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
Brian D. Ripley, ripley at 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-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 _._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._