Re: [R] templated use of aggregate

2012-06-13 Thread Matthew Johnson
thank you for your patience. i assure you i will get better with the appropriate etiquette - and hopefully eventually contribute. On 13 June 2012 16:18, David Winsemius wrote: > > On Jun 13, 2012, at 10:09 AM, Matthew Johnson wrote: > >> my sessioninfo was as follows: >> >>> sessionInfo() >> >> R

Re: [R] templated use of aggregate

2012-06-13 Thread David Winsemius
On Jun 13, 2012, at 10:09 AM, Matthew Johnson wrote: my sessioninfo was as follows: sessionInfo() R version 2.14.1 (2011-12-22) Platform: x86_64-apple-darwin9.8.0/x86_64 (64-bit) locale: [1] en_AU.UTF-8/en_AU.UTF-8/en_AU.UTF-8/C/en_AU.UTF-8/en_AU.UTF-8 attached base packages: [1] stats

Re: [R] templated use of aggregate

2012-06-13 Thread Matthew Johnson
Sorry about the cross posting - i didn't realise it was bad etiquette. my sessioninfo was as follows: > sessionInfo() R version 2.14.1 (2011-12-22) Platform: x86_64-apple-darwin9.8.0/x86_64 (64-bit) locale: [1] en_AU.UTF-8/en_AU.UTF-8/en_AU.UTF-8/C/en_AU.UTF-8/en_AU.UTF-8 attached base packages

Re: [R] templated use of aggregate

2012-06-13 Thread Matthew Johnson
Sorry, i'll try and put more flesh on the bones. please note, i changed the data in the example, as fiddling has raised another question that's best illustrated with a slightly different data set. first of all, when i do as you suggest, i obtain the following error: > PxMat <- aggregate(mm[,-1]

Re: [R] templated use of aggregate

2012-06-13 Thread David Winsemius
On Jun 12, 2012, at 11:32 PM, Matthew Johnson wrote: Dear R-help, I have an xts data set that i have subset by date. now it contains a date-time-stamp, and two columns (price and volume traded): my objective is to create tables of volume traded at a price - and i've been successfully using

Re: [R] templated use of aggregate

2012-06-13 Thread David Winsemius
On Jun 13, 2012, at 9:38 AM, Matthew Johnson wrote: Sorry, i'll try and put more flesh on the bones. please note, i changed the data in the example, as fiddling has raised another question that's best illustrated with a slightly different data set. first of all, when i do as you suggest, i ob

Re: [R] templated use of aggregate

2012-06-13 Thread John Kane
I think the column is wrong in adf <- aggregate(.~mm[,1], data=mm, sum) Try 2 rather than 1 but this is just a guess since the sample data is not easily useable.. Please supply your sample data using dput(() See ?dput for information. It makes llife much easier for the reader. John Kane Kings