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 sub-matrix. Reproting behaviour as 'strange' without explaining what you thought should have happened and why leaves us guessing as to what you think the 'bug' might be. On Tue, 19 Feb 2008, [EMAIL PROTECTED] wrote: > See below: > > > >> d = data.frame(v1=1:2,v2=1:2) > >> x = matrix(0,2,2) > >> x[,1:2] = d[,1:2] > >> x > > [[1]] > > [1] 1 2 > > > > [[2]] > > [1] 1 2 > > > > [[3]] > > [1] 1 2 > > > > [[4]] > > [1] 1 2 > > > >> > > > > Thanks for all the work in R. Still love it. > > > > David > > > > > > David Lubinsky > > Director > > OPSI Systems > > > > Phone: +27 11 880 7951 > > Cell: +27 82 452 9556 > > URL: <http://www.opsi.co.za> www.opsi.co.za > > Email: <mailto:[EMAIL PROTECTED]> [EMAIL PROTECTED] > > > > > [[alternative HTML version deleted]] > > ______________________________________________ > R-devel@r-project.org mailing list > https://stat.ethz.ch/mailman/listinfo/r-devel > -- Brian D. Ripley, [EMAIL PROTECTED] 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 272866 (PA) Oxford OX1 3TG, UK Fax: +44 1865 272595 ______________________________________________ R-devel@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-devel