Displaying 1 result from an estimated 1 matches for "lubinski".
Did you mean:
lubonski
2008 Feb 19
0
(PR#10799) Assigning a sub-matrix from a data frame to a
Where precisely is the bug here? If you assign a list (d[,1:2] is a list:
it is the whole data frame) to a numeric matrix you coerce the latter to
mode list, and that is what happened.
If we have the simpler version
d <- data.frame(v1=1:2,v2=3:4)
x <- matrix(0, 2, 2)
x[] <- d
it may be easier to see what happened.
I think the problem is in your subject line: d[,1:2] is _not_ a