search for: fourdoubles

Displaying 1 result from an estimated 1 matches for "fourdoubles".

2006 Nov 03
1
man page for as.matrix for data frames outdated?
...mode(as.matrix(df1)) [1] "logical" Otherwise it's not true that 'as.matrix' will return a character matrix: > fourInts <- 2:-1 > df2 <- data.frame(a=fourLogicals, b=fourInts) > storage.mode(as.matrix(df2)) [1] "integer" > fourDoubles <- rep(pi,4) > df3 <- data.frame(c=fourDoubles, a=fourLogicals, b=fourInts) > storage.mode(as.matrix(df3)) [1] "double" > fourComplexes <- (-1:2)+3i > df4 <- data.frame(a=fourLogicals, d=fourComplexes, b=fourInts, c=fourDoubles) > s...