Re: [Rd] Aggregate factor names

From: Martin Elff <elff_at_sowi.uni-mannheim.de>
Date: Mon, 1 Oct 2007 17:24:18 +0200

On Thursday 27 September 2007 (17:57:55), Mike Lawrence wrote:
> ex. it is annoying to type
>
> with(
>         my.data
>         ,aggregate(
>                 my.dv
>                 ,list(
>                         one.iv = one.iv
>                         ,another.iv = another.iv
>                         ,yet.another.iv = yet.another.iv
>                 )
>                 ,some.function
>         )
> )

If you use my package 'memisc' you can write

aggregate(some.function(my.dv)~one.iv+another.iv+yet.another.iv,

                data=my.data)

Best,
Martin

-- 
"Dealing with failure is easy: work hard to improve.  Success is also
easy to handle: you've solved the wrong problem.  Work hard to
improve."
  fortune 1.0

-------------------------------------------------
Dr. Martin Elff
Dept. of Social Sciences
University of Mannheim
Block A5, Room A 328 (NEW)
68131 Mannheim
Germany

Phone: +49-621-181-2093
Fax: +49-621-181-2099
E-Mail: elff_at_sowi.uni-mannheim.de
Web: http://webrum.uni-mannheim.de/sowi/elff/
     http://www.sowi.uni-mannheim.de/lspwivs/
-------------------------------------------------

______________________________________________
R-devel_at_r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-devel
Received on Mon 01 Oct 2007 - 15:28:19 GMT

Archive maintained by Robert King, hosted by the discipline of statistics at the University of Newcastle, Australia.
Archive generated by hypermail 2.2.0, at Thu 25 Oct 2007 - 11:37:10 GMT.

Mailing list information is available at https://stat.ethz.ch/mailman/listinfo/r-devel. Please read the posting guide before posting to the list.