Skip to content
Prev 34695 / 63424 Next

error in install.packages() (PR#14042)

If you could decide on a good name for the new argument
and the format of the data in it I could implement it in
S+ and keep R & S+ compatible.  The format issue seems
bigger to me.  Giving a prototype of the expected return
value is very flexible but wastes a bit of space.  I propose
treating it much as the value of FUN(X[[1]]) is treated.
If the prototype included names then those could become the row
names of the matrix output, instead of the names on the
actual return values.  (I would ignore the row names
when asking if the expected return value sufficiently resembled
the actual one.)  E.g., the current
   > sapply(split(log(1:10), rep(letters[1:2],c(3,7))), quantile,
(1:2)/3)
                     a        b
   33.33333% 0.4620981 1.791759
   66.66667% 0.8283022 2.079442
with THE.NEW.ARGUMENT=c(T1=0,T2=0) would return
              a        b
   T1 0.4620981 1.791759
   T2 0.8283022 2.079442
(I don't know if that behavior is needed, but it is a correlary
of using THE.NEW.ARGUMENT instead of FUN(X[[1]]) as the source
of row names and perhaps other data.)

Should THE.NEW.ARGUMENT's mode have to match exactly the mode
of FUN(X[[i]]) or should it just be possible to coerce the value
of FUN(X[[i]]) to it?

Bill Dunlap
Spotfire, TIBCO Software
wdunlap tibco.com