Skip to content

Instantly share code, notes, and snippets.

@prasoonsharma
Created February 17, 2011 02:13

Revisions

  1. prasoonsharma revised this gist Feb 17, 2011. 1 changed file with 5 additions and 5 deletions.
    10 changes: 5 additions & 5 deletions gistfile1.txt
    Original file line number Diff line number Diff line change
    @@ -1,7 +1,7 @@

    foreach i in A B C D {
    forval n=1990/2000 {
    local m = 'n'-1
    generate pop'i''n' = pop'i''m' * (1 + trend'n')
    }
    forval n=1990/2000 {
    local m = 'n'-1
    # create new columns from existing ones on-the-fly
    generate pop'i''n' = pop'i''m' * (1 + trend'n')
    }
    }
  2. prasoonsharma created this gist Feb 17, 2011.
    7 changes: 7 additions & 0 deletions gistfile1.txt
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,7 @@

    foreach i in A B C D {
    forval n=1990/2000 {
    local m = 'n'-1
    generate pop'i''n' = pop'i''m' * (1 + trend'n')
    }
    }