From elff at sowi.uni-mannheim.de  Mon Oct  1 17:24:18 2007
From: elff at sowi.uni-mannheim.de (Martin Elff)
Date: Mon, 1 Oct 2007 17:24:18 +0200
Subject: [Rd] Aggregate factor names
In-Reply-To: <375E8B77-0436-472C-9F85-C56B46DFFEE9@DAL.CA>
References: <375E8B77-0436-472C-9F85-C56B46DFFEE9@DAL.CA>
Message-ID: <200710011724.18691.elff@sowi.uni-mannheim.de>

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



[Rd] Aggregate factor names
Martin Elff