[Rd] Aggregate factor names

Martin Elff elff at sowi.uni-mannheim.de
Mon Oct 1 17:24:18 CEST 2007


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/
-------------------------------------------------



More information about the R-devel mailing list