s-news
[Top] [All Lists]

extracting a matrix from a data frame

To: s-news@lists.biostat.wustl.edu
Subject: extracting a matrix from a data frame
From: "Chris Evans" <chris1@psyctc.org>
Date: Sat, 24 Mar 2001 19:25:32 -0000
Organization: PSYCTC.org
I'm a researcher who often has to do my own statistics for various 
reasons so apologies if this and two other questions are pretty low 
level.

I've just found the apply function and the array objects brilliant for 
speedy work on some 3 mode rating data.  The data had to be 
imported from an SPSS data set so my first silly question is how I 
should extract a matrix from a data frame.  I wanted some 
contiguous columns in the frame to become a matrix.  I ended up 
using c to concatenate the variables, listed laboriously, after 
attaching the frame.  I must be missing something in the 
subscripting of data frames musn't I?  Would someone tell me or 
point me to right place?

TIA,


Chris

Chris Evans <chris@psyctc.org>
Consultant Psychiatrist in Psychotherapy,
Rampton Hospital; Associate R&D Director,
Tavistock & Portman NHS Trust;
Hon. SL Institute of Psychiatry
*** My views are my own and not representative 
of those institutions ***

<Prev in Thread] Current Thread [Next in Thread>