[R] List to vector

John Zhang jzhang at jimmy.harvard.edu
Thu Dec 12 15:01:03 CET 2002


Would this work for you?

> tt <- list(a = 1, b = 2, c = 3)
> tt
$a
[1] 1

$b
[1] 2

$c
[1] 3

> unlist(tt)
a b c 
1 2 3 

>From: "Vikentia Provizionatou" <vprovi at essex.ac.uk>
>To: <r-help at stat.math.ethz.ch>
>MIME-Version: 1.0
>Content-Transfer-Encoding: 7bit
>X-Priority: 3 (Normal)
>X-MSMail-Priority: Normal
>Importance: Normal
>X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1106
>X-MailScanner: Found to be clean
>X-Virus-Scanned: by amavisd-milter (http://amavis.org/)
>X-Virus-Scanned: by amavisd-milter (http://amavis.org/)
>X-Spam-Status: No, hits=0.6 required=5.0 
tests=SPAM_PHRASE_00_01,SUBJECT_IS_LIST version=2.43
>X-Spam-Level: 
>Subject: [R] List to vector
>X-BeenThere: r-help at stat.math.ethz.ch
>X-Mailman-Version: 2.0.13
>List-Help: <mailto:r-help-request at stat.math.ethz.ch?subject=help>
>List-Post: <mailto:r-help at stat.math.ethz.ch>
>List-Subscribe: <http://www.stat.math.ethz.ch/mailman/listinfo/r-help>, 
<mailto:r-help-request at stat.math.ethz.ch?subject=subscribe>
>List-Id: Main R Mailing List: Primary help <r-help.stat.math.ethz.ch>
>List-Unsubscribe: <http://www.stat.math.ethz.ch/mailman/listinfo/r-help>, 
<mailto:r-help-request at stat.math.ethz.ch?subject=unsubscribe>
>List-Archive: <http://www.stat.math.ethz.ch/pipermail/r-help/>
>X-Original-Date: Thu, 12 Dec 2002 13:50:45 -0000
>Date: Thu, 12 Dec 2002 13:50:45 -0000
>
>Hi,
>
>Can you help me to transform my list file to a numeric vector file?
>
>Thanks a lot.
>
>Vikentia
>
>______________________________________________
>R-help at stat.math.ethz.ch mailing list
>http://www.stat.math.ethz.ch/mailman/listinfo/r-help




More information about the R-help mailing list