[R] Range across a List

jim holtman jholtman at gmail.com
Wed Mar 26 22:01:00 CET 2008


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?



More information about the R-help mailing list