.-
help for ^ggen^, ^rreplace^, ^rrecode^ & ^rrename^ 
.-

automatically attach notes to modified variables
------------------------------------------------

	^ggen^   : see online help for @generate@

	^rreplace^  : see online help for @replace@

	^rrecode^: see online help for @recode@

	^rrename^: see online help for @rename@


 ^ggen^ and ^rreplace^ are byable.

These commands generate new variables, replace, recode or rename existing variable, 
and automaticlly post notes to the variables generated or modified by the command.

Earlier versions (for Stata version 6) of ^ggen^ and ^rreplace^, called ^ggen^ and 
^rreplace^ were discussed on Statalist and written by William Gould of Stata Corp.
They had a -by- option.
The current versions of ^ggen^ and ^rreplace^ are written for Stata version 7. 
They are byable


	-----------------------------------------------------------
	. ggen kwgt = weight/1000
	
	. ggen double gpm = 1/mpg
	
	. notes 
	
	_dta:
	  1.  from Consumer Reports with permission
	
	kwgt:
	  1.  ggen kwgt = weight/1000
	
	gpm:
	  1.  ggen double gpm = 1/mpg
	
	. bysort foreign: ggen avg = sum(mpg)/sum(mpg~=.)
	
	. by foreign: rreplace avg = avg[_N]
	(72 real changes made)
	
	. notes avg
	
	avg:
	  1.  by foreign, : ggen avg = sum(mpg)/sum(mpg~=.)
	  2.  by foreign, : rreplace avg = avg[_N]

	. rrecode foreign 0=2
	(foreign: 52 changes made)

	. notes foreign

	foreign:
	  1.  rrecode foreign 0=2

	. rrename avg average

	. notes average

	average:
	  1.  by foreign, : ggen avg = sum(mpg)/sum(mpg~=.)
	  2.  by foreign, : rreplace avg = avg[_N]
	  3.  rrename avg average

	-----------------------------------------------------------


Author
------

Estie Sid Hudes (ehudes@@psg.ucsf.edu)


Also see
--------

Manual:   ^[R] generate^
          ^[R] replace^
          ^[R] recode^
          ^[R] rename^

On-line:  help for @generate@, @replace@, @recode@, @rename@



