[R] Matrix/Data.Frame questions

Laura Gross laura at bayesian-bay.freeserve.co.uk
Tue Oct 30 10:59:57 CET 2001


Dear list

Thanks to all who answered my query yesterday regarding the maximum size
of a matrix in R.

I have a couple more questions to ask with being new to R!

1. Having imported my data into R from SPSS, I have a data.frame
consisting of several variables. I am wanting to store my response
variable, Y, and four explanatory variables, X, in vectors/matrices. How
can I do this in R? 

2. If I have say a 4x4 matrix, A, and I want to extract part of this
matrix to create a submatrix, B, (say row 1:3 and column 1:3) how can I
do this?
Could it be done something like: B<-A[1:3,1:3] ?

Thanks for any help
Laura

-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
r-help mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html
Send "info", "help", or "[un]subscribe"
(in the "body", not the subject !)  To: r-help-request at stat.math.ethz.ch
_._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._



More information about the R-help mailing list