 <p>You can store a whole matrix in one column of a <code>data.frame</code>:</p> <pre><code>x &lt;- a [, -1] y &lt;- a [, 1] data &lt;- data.frame (y = y, x = I (x)) str (data) ## 'data.frame': 10 obs. of 2 variables: ## $ y: num 0.818 0.767 -0.666 0.788 -0.489 ... ## $ x: AsIs [1:10, 1:9] 0.916274.... 0.386565.... 0.703230.... -2.64091.... 0.274617.... ... model &lt;- lm (y ~ x) newdata &lt;- data.frame (x = I (b [, -1])) predict (model, newdata) ## 1 2 ## -3.795722 -4.778784 </code></pre> <p>The paper about the pls package, (<a href="http://www.jstatsoft.org/v18/i02/" rel="nofollow">Mevik, B.-H. and Wehrens, R. The pls Package: Principal Component and Partial Least Squares Regression in R Journal of Statistical Software, 2007, 18, 1 - 24.</a>) explains this technique. </p> <p>Another example with a spectroscopic data set (quinine fluorescence), is in <a href="http://hyperspec.r-forge.r-project.org/blob/flu.pdf" rel="nofollow"><code>vignette ("flu")</code></a> of my package hyperSpec. </p>