Style is an important element of writing useful scripts for statistical computing. Scripts submitted for this course will graded using the rubric below. The rubric consists of five key elements: headers, comments, formatting, naming, and consistency. Each element will be graded according to the three point scale provided below.
You may wish to read Google’s R Style Guide. However, please note the differences in what is considered course style:
=
rather than <-
for assignment.snake_case
for naming objects (“identifiers”).Score | Description |
---|---|
3 | Scripts for this assignment are excellent demonstrations of the graded style element. |
2 | Scripts for this assignment generally follow the graded style element but show occasional lapses in consistency or minor deviations from the guideline. Lapses or inconsistencies effect the aesthetic appeal of the script, but not its overall readability. |
1 | Scripts for this assignment attempt to follow the grade style element, but do so poorly. The missing or poorly missing style elements effect the overall readability of the script. |
0 | The script demonstrates no understanding of a given style element. |
Scripts will be scored on each of the key style elements below.
Style Element | Description |
---|---|
Header | The script contains an informative and clearly demarcated header including essential elements including: author, references to sources for data or approach, relation (if any) to other project scripts, and a concise description of what the script does. |
Comments | Comments are used appropriately throughout the script to organize the script and clarify what particular (sets of) commands are meant to accomplish. |
Formatting | Indentation and spacing are used consistently to maximize readability and long lines are broken into appropriate pieces. |
Naming | Variables (and other objects) are named appropriately and add to the scripts readability. Capitalization and word separators are used consistently. |
Consistency | Stylistic choices are used consistently throughout each script and follow commonly used conventions or agreed upon norms. |