[R] matrix in data.frame

From: Lina Hultin-Rosenberg <lina.hultin-rosenberg_at_ki.se>
Date: Wed, 30 May 2007 11:25:46 +0200


Dear list!

I have run into a problem that seems very simple but I can't find any solution to it (have searched the internet, help-files and "An introduction to R" etc without any luck). The problem is the following: I would like to create a data.frame with two components (columns), the first component being a matrix and the second component a vector. Whatever I have tried so far, I end up with a data.frame containing all the columns from the matrix plus the vector which is not what I am after. I have seen this kind of data.frame among R example datasets (oliveoil and yarn).

I would greatly appreciate some help with this problem!

Kind regards,

Lina Hultin Rosenberg
Karolinska Biomics Center
Karolinska Institute
Sweden



R-help_at_stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code. Received on Wed 30 May 2007 - 09:36:04 GMT

Archive maintained by Robert King, hosted by the discipline of statistics at the University of Newcastle, Australia.
Archive generated by hypermail 2.2.0, at Wed 30 May 2007 - 11:31:34 GMT.

Mailing list information is available at https://stat.ethz.ch/mailman/listinfo/r-help. Please read the posting guide before posting to the list.