you can do this:

a <- tapply(VAR, YEAR, prod)

The use "merge" to create a new variable of the length of your original VAR,
and just do
VAR/prod.VAR




----------------Contact
Details:-------------------------------------------------------
Contact me: Tal.Galili@gmail.com |  972-52-7275845
Read me: www.talgalili.com (Hebrew) | www.biostatistics.co.il (Hebrew) |
www.r-statistics.com (English)
----------------------------------------------------------------------------------------------




On Mon, Apr 26, 2010 at 6:07 PM, n.vialma@libero.it <n.vialma@libero.it>wrote:

> PROD

	[[alternative HTML version deleted]]

