This shows you the differences between two versions of the page.
Both sides previous revision Previous revision | Next revision Both sides next revision | ||
development:ohdsi_code_style_for_r [2015/06/09 04:06] schuemie |
development:ohdsi_code_style_for_r [2017/06/09 15:23] schuemie |
||
---|---|---|---|
Line 112: | Line 112: | ||
''if (a == b) doSomething()'' | ''if (a == b) doSomething()'' | ||
+ | |||
+ | ===== Use named arguments ===== | ||
+ | |||
+ | When calling a function that has more than one argument, make sure to refer to each argument by name instead of relying on the order of arguments. | ||
+ | |||
+ | **Good** | ||
+ | |||
+ | ''translateSql(sql = "COMMIT", targetDialect = "PDW")'' | ||
+ | |||
+ | **Bad** | ||
+ | |||
+ | ''translateSql("COMMIT", "PDW")'' | ||
===== Commenting guidelines ===== | ===== Commenting guidelines ===== |