<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=Content-Type content="text/html; charset=big5">
<META content="MSHTML 5.50.4522.1800" name=GENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY bgColor=#c8e0d8>
<DIV><FONT face=MingLiu size=2>Hi,</FONT></DIV>
<DIV><FONT face=細明體 size=2></FONT> </DIV>
<DIV><FONT face=細明體 size=2>Suppose I have a dataset with 10 columns, let's call
it "foo".</FONT></DIV>
<DIV><FONT face=細明體 size=2></FONT> </DIV>
<DIV><FONT face=細明體 size=2>Now if I want to extract out only column 2 ~ 8, then
I know I can use either:</FONT></DIV>
<DIV><FONT face=細明體 size=2> foo[ ,2:8]</FONT></DIV>
<DIV><FONT face=細明體 size=2>or</FONT></DIV>
<DIV><FONT face=細明體 size=2> fooNew <- list( foo[
,2:8] )</FONT></DIV>
<DIV><FONT face=細明體 size=2></FONT> </DIV>
<DIV><FONT face=細明體 size=2>(Is there any other alternative, just out of
curiosity?)</FONT></DIV>
<DIV><FONT face=細明體 size=2></FONT> </DIV>
<DIV><FONT face=細明體 size=2>But, if I only want, say, column 1, 4 and 7, I
tried:</FONT></DIV>
<DIV><FONT face=MingLiu size=2> fooNew <- list( x =
foo[ ,1], y = foo[ ,4], z = foo[ , 7] )</FONT></DIV>
<DIV><FONT face=細明體 size=2>then when I type </FONT></DIV>
<DIV><FONT face=細明體 size=2> fooNew</FONT></DIV>
<DIV><FONT face=細明體 size=2>I got a list of:</FONT></DIV>
<DIV><FONT face=細明體 size=2> $x</FONT></DIV>
<DIV><FONT face=細明體 size=2> ....</FONT></DIV>
<DIV><FONT face=細明體 size=2> <FONT
face=MingLiu>....</FONT></FONT></DIV>
<DIV><FONT face=細明體 size=2> $y</FONT></DIV>
<DIV><FONT face=細明體 size=2> ....</FONT></DIV>
<DIV><FONT face=細明體 size=2> ....</FONT></DIV>
<DIV><FONT face=細明體 size=2> <FONT face=MingLiu>$z</FONT></FONT></DIV>
<DIV><FONT face=細明體 size=2> ....</FONT></DIV>
<DIV><FONT face=細明體 size=2> ....</FONT></DIV>
<DIV><FONT face=細明體 size=2></FONT> </DIV>
<DIV><FONT face=細明體 size=2>However what I really want is for them to be in
vector/column form. How would I do this?</FONT></DIV>
<DIV><FONT face=細明體 size=2></FONT> </DIV>
<DIV><FONT face=細明體 size=2>Thanks in advance!</FONT></DIV>
<DIV><FONT face=細明體 size=2></FONT> </DIV>
<DIV><FONT face=細明體 size=2></FONT> </DIV>
<DIV><FONT face=細明體 size=2>Kevin</FONT></DIV>
<DIV><FONT face=細明體 size=2> </FONT></DIV>
<DIV><FONT face=MingLiu
size=2>-------------------------------------------------<BR>Ko-Kang Kevin
Wang<BR>Statistical Analysis Division Leader<BR>Software Developers'
Klub<BR>University of Auckland<BR>New Zealand</FONT></DIV></BODY></HTML>