"Cannot revert it"? Doesn't setting up a new default parameter in the calling 
function ("ave") accomplish that?
---------------------------------------------------------------------------
Jeff Newmiller The ..... ..... Go Live...
DCN:<jdnew...@dcn.davis.ca.us> Basics: ##.#. ##.#. Live Go...
Live: OO#.. Dead: OO#.. Playing
Research Engineer (Solar/Batteries O.O#. #.O#. with
/Software/Embedded Controllers) .OO#. .OO#. rocks...1k
--------------------------------------------------------------------------- 
Sent from my phone. Please excuse my brevity.

peter dalgaard <pda...@gmail.com> wrote:

On May 7, 2011, at 17:21 , Hadley Wickham wrote: >> >> Well, ave() uses 
interaction(...) and interaction() has a "drop" argument, so >> >>> with(x, 
ave(H, Site, Prof, drop=TRUE, FUN=function(y)y-min(y))) >> [1] 8 0 51 0 33 22 
21 0 > > I don't understand why this isn't the default. > > Hadley Defensive 
programming, maybe? It's not the default for interaction(), which makes sense, 
and if you pass a non-default option, you cannot revert it. Not that I can 
think up a case where you'd actually want to process the empty levels either. 
-- Peter Dalgaard Center for Statistics, Copenhagen Business School Solbjerg 
Plads 3, 2000 Frederiksberg, Denmark Phone: (+45)38153501 Email: pd....@cbs.dk 
Priv: PDalgd@gmail.com_____________________________________________
R-help@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. 


        [[alternative HTML version deleted]]

______________________________________________
R-help@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.

Reply via email to