s-news
[Top] [All Lists]

Re: extracting a matrix from a data frame

To: s-news@lists.biostat.wustl.edu
Subject: Re: extracting a matrix from a data frame
From: "Chris Evans" <chris1@psyctc.org>
Date: Sun, 25 Mar 2001 14:43:18 +0100
Organization: PSYCTC.org
Thanks to everyone for their answers to this one.  

> data.matrix(twblack[,4:22])

where twblack is my imported data frame, does exactly what I 
wanted, dumping the first three columns and taking the remaining 19 
which were simple numeric variables as a matrix.  I don't know what 
I was doing wrong as I'd have sworn I'd tried that and got error 
messages yesterday.  

Wonderful list!

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>