Skip to content
Prev 6238 / 398500 Next

Difference between SPlus & R question

On Thu, 22 Jun 2000, Marc Feldesman wrote:

            
v5<-data.frame(v4, v3)?
These do not work in S-PLUS 3.4 (`the prototype').
data.frame(v1, v2, v3=rep("gorilla", 50))

will certainly do.


The bug (if it is considered to be one) is at the line

        if (length(xi) == 1 && nr%%nrows[[i]] == 0 && is.vector(xi[[1]])) 
            value[[i]] <- list(rep(xi[[1]], length = nr))

in data.frame.  is.vector is too severe a test, failed by a factor.