Re: [R] Range across a List

From: jim holtman <jholtman_at_gmail.com>
Date: Wed, 26 Mar 2008 16:01:00 -0500

Not exactly clear what the data in the list looks like. Is it a dataframe of the format you listed? Do you want just a single range for the dates? Do you want to create one large dataframe and then partition it by date to find the range? You can do "do.call(rbind,pp2)" to create the one large dataframe and then use tapply to find the range of each date.

On 3/26/08, Ravi S. Shankar <ravis_at_ambaresearch.com> wrote:
> Hi R,
> I have a list
> > class(pp2)
> [1] "list"
>
> > length(pp2)
> [1] 1244
>
> It is in the below format
> RIC Trade.Date Close.Price Currency.Code Convertion.Rate New.Price
> ABCD.SZ 2008/02/29 15.30 CNY 0.1408 2.154240
> ABCD.SZ 2008/01/31 15.27 CNY 0.1392 2.125584
> ABCD.SZ 2007/12/31 14.88 CNY 0.1371 2.040048
> ABCD.SZ 2007/11/30 11.07 CNY 0.1357 1.502199
> ABCD.SZ 2007/10/31 10.89 CNY 0.1340 1.459260
> ABCD.SZ 2007/09/28 12.77 CNY 0.1334 1.703518
>
> I want to find the range of pp2$New.Price for length(pp2) for each date
> Any help would be appreciated
>
> Thanks in advance
> Ravi
>
>
> This e-mail may contain confidential and/or privileged i...{{dropped:10}}
>
> ______________________________________________
> 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.
>

-- 
Jim Holtman
Cincinnati, OH
+1 513 646 9390

What is the problem you are trying to solve?

______________________________________________
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.
Received on Thu 27 Mar 2008 - 00:29:45 GMT

Archive maintained by Robert King, hosted by the discipline of statistics at the University of Newcastle, Australia.
Archive generated by hypermail 2.2.0, at Thu 27 Mar 2008 - 00:30:24 GMT.

Mailing list information is available at https://stat.ethz.ch/mailman/listinfo/r-help. Please read the posting guide before posting to the list.

list of date sections of archive