Skip to content
Back to formatted view

Raw Message

Message-ID: <58EDEF54-D1A8-49C8-988C-23366562A14A@gmail.com>
Date: 2009-11-24T23:49:25Z
From: Nikhil Kaza
Subject: How to get the item in list that is a number?
In-Reply-To: <366c6f340911241450w61cb09ddtef14a7792a502be8@mail.gmail.com>

?unlist

if I understand you correctly.

On 24 Nov 2009, at 5:50PM, Peng Yu wrote:

> I have the following list. The second item in the list is a number.
> I'm wondering how to write R code to return this information for any
> list?
>
>
> $`1`
> integer(0)
>
> $`2`
> [1] 123
>
> $`3`
> integer(0)
>
> $`4`
> integer(0)
>
> $`5`
> integer(0)
>
> ______________________________________________
> R-help at r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
> and provide commented, minimal, self-contained, reproducible code.