Re: [R] Odp: Aggregation and the meaning of class

2008-06-02 Thread Chip Barnaby
to me that such a conversion could be usefully defined), so now I don't hit myself on the head with that particular hammer.) Chip Barnaby - Chip Barnaby [EMAIL PROTECTED] Vice President of Research Wrightsoft

[R] Aggregation and the meaning of class

2008-05-30 Thread Chip Barnaby
messages? (For example, I now know that a by cannot be coerced into a data.frame (although it seems to me that such a conversion could be usefully defined), so now I don't hit myself on the head with that particular hammer.) Chip Barnaby

[R] Grouped weighted.mean

2008-05-28 Thread Chip Barnaby
same length How does one pass grouped arguments to processing functions such as weighted.mean() ? TIA, Chip Barnaby - Chip Barnaby [EMAIL PROTECTED] Vice President of Research Wrightsoft Corp. 781

[R] Collection of lm()s

2008-05-12 Thread Chip Barnaby
have to retain a copy the associated DXS subsets? TIA, Chip Barnaby - Chip Barnaby [EMAIL PROTECTED] Vice President of Research Wrightsoft Corp. 781-862-8719 x118 voice 131 Hartwell Ave 781-861

[R] Data frame row manipulation

2008-05-09 Thread Chip Barnaby
row value of vx is overwritten. A2 would have 10 times as many rows as A. I have of course discarded idea of using of a for loop, but maybe that is what it takes. TIA etc, Chip Barnaby - Chip Barnaby [EMAIL

[R] Column renaming

2008-05-05 Thread Chip Barnaby
Dear all, Is there a less cumbersome way to rename a column by name (as opposed to index) than -- names( X)[ names[ X] == bob]-sue ? A semi-related question: how does one get the index of a column by name, something along the lines of col.index( X, sue) ? Chip Barnaby

Re: [R] Column renaming

2008-05-05 Thread Chip Barnaby
Peter, My method seems to work, see below. Is there some reason it might not work in general? This is the tersest way I have found to rename, but it seems awkward, given that names( X) is repeated. Chip Barnaby -- head( airquality) Ozone Solar.R Wind Temp Month

Re: [R] Column renaming

2008-05-05 Thread Chip Barnaby
not seem to allow that approach without some awkwardness. I guess I could write some helper functions. Chip Barnaby At 11:47 AM 5/5/2008, Peter Dalgaard wrote: Chip Barnaby wrote: Peter, My method seems to work, see below. Is there some reason it might not work in general

Re: [R] Aggregate() questions

2008-05-01 Thread Chip Barnaby
.VB10045.3.12.3.0 [7] BC6-VB000.VB00045.3.12.3.0 BC6-VB020.VB02045.3.12.3.0 [9] BC6-VB040.VB04045.3.12.3.0 BC6-VB060.VB06045.3.12.3.0 (etc, 90 values which is correct) Thanks, Chip Barnaby At 03:09 PM 4/30/2008, Henrique Dallazuanna wrote: If I understand your question: x$IAC0 - with(x, ave(IAC

[R] Aggregate() questions

2008-04-30 Thread Chip Barnaby
work so smoothly. Thanks! Chip Barnaby - Chip Barnaby [EMAIL PROTECTED] Vice President of Research Wrightsoft Corp. 781-862-8719 x118 voice 131 Hartwell Ave 781-861-2058 fax Lexington, MA

[R] predict.lm() question

2008-04-07 Thread Chip Barnaby
(s) as used when the model was made. In the example below, predict.lm produces the predictions for the original (model input) data plus a warning message. What I want is predictions for alternative data (in data frame DX in the example). Thanks, Chip Barnaby D-data.frame( X=seq(1:10)) D$Y-D