Difference between revisions of "User:Kbjarkefur"

Jump to: navigation, search
Line 20: Line 20:


'''Ex.1'''  
'''Ex.1'''  
<code>foreach thing in space coding wrestling <nowiki>{</nowiki>
<code>
  display "I like `thing'"
gen varA = 0
}</code>
replace varA = 1 if gender == 1
</code>

Revision as of 21:06, 26 October 2017

About me

Pages on this wiki I frequently need:

Code snippet example

This part is using the regular <code> tag which is great when writing code in the middle of a sentence:

Ex.1 Use the 'egen' function rowtotal() when aggregating variables.

However, the <code> tag is not great when writing multiple lines of code:

Ex.1 gen varA = 0 replace varA = 1 if gender == 1