Displaying 9 results from an estimated 9 matches for "sammassimo".
2007 Mar 28
2
aggregating data with Zoo
...ction in the documentation but am unsure how
to change this so any day of week can be aggregated.
I have used POSIX to arrange the data (not as 'zoo' series) according to day
of week, but am curious if I've missed if a similar option available with
zoo.
Thank you for any help,
Alf Sammassimo
Melbourne, Australia
2007 Feb 19
2
help with loop over data frame
...for 'today' is higher than the column value "High" for the
previous day (previous row). How do I loop over each day accessing values
from different rows and columns, as is needed here?
I have tried 'if' statements but none have worked.
Any help appreciated.
Regards,
Alf Sammassimo
Melbourne,Australia
2007 May 28
2
Yearly statistics
...quot;lc" is negative on any given day. Looking to return something
like:
Yr Prop
2004 1.0
2005 0.8
Along these lines, if I have datasets A and B, where B is a subset of A, can
I use the number of matching dates to calculate the yearly proportions in
question?
Thanks,
Alfonso Sammassimo
Melbourne Australia
2007 Feb 22
2
Is there better alternative to this loop?
...e differently (without conventional loop) in R:
flag="T"
d= 3 # d represents previous down days
for(i in (d+1): 100)
{
for( j in (i-d):(i-1))
{
if(x[j,5]<x[i,5]){flag="F"}
}
if( flag == "T"){ print(x[i,1])}
flag="T";
}
Any help appreciated,
Regards,
Alf Sammassimo
Melbourne, Australia.
2006 Dec 10
1
using zoo for daily stock prices
...long these lines, is there a simple way
to index to certain dates(eg first of month, last of month, any specific
date in one month) and keep looping over each month using such a reference
point, and then assessing the results for each month?
Any guidance would be sincerely appreciated,
Alfonso Sammassimo
Melbourne, Australia.
2007 Feb 22
1
how to show date with this subset
...instead, but it would only apply to the
first column of every row("warning condition has length>1 and only first
element will be used"):
for ( i in 2:length(x[,1])) if (x[i,]<x[i-1,]) {print(x[i,])}
How can I resolve with either method? Any help much appreciated.
Regards,
Alf Sammassimo.
2007 Jun 08
4
match rows of data frame
...s me all the rows of B, plus the 5th
next row(occuring in A). I have used the below code, but it gives me all 5
rows after the matching row. I only want the 5th.
FiveDaysLater <- A[c(sapply(match(rownames(B),rownames(A)), seq,
length=6))),]
Any guidance much appreciated,
Thankyou.
Alfonso Sammassimo
Melbourne, Australia.
2007 Mar 02
1
extracting data from zoo series
...on a certain condition, call
this series "B".
I want to use the dates from "B" as an index, so as each of these dates
occur in "A", the succeeding five rows from "A" after this date are printed
out.
Any help would be most appreciated.
Regards,
Alfonso Sammassimo
Melbourne, Victoria
2007 Jun 01
1
aggregate in zoo
...01 1351.95
2001-04-02 02 1268.10
2001-05-01 01 1369.20
2001-06-01 01 1362.75
2001-07-02 02 1331.55
2001-08-01 01 1309.70
2001-09-04 04 1235.55
2001-10-01 01 1109.20
2001-11-01 01 1155.55
2001-12-03 03 1207.30
Thank you,
Alfonso Sammassimo
Melbourne, Australia