Skip to content

Commit

Permalink
Merge pull request #10 from markusmin/main
Browse files Browse the repository at this point in the history
added two slides on 1) cases and 2) janitor pkg
  • Loading branch information
mdscheuerell authored Jan 22, 2025
2 parents 61a51fd + b3455b3 commit 6ff909f
Show file tree
Hide file tree
Showing 3 changed files with 34 additions and 0 deletions.
Binary file added lectures/week_03/images/allison_horst_cases.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
15 changes: 15 additions & 0 deletions lectures/week_03/lec_09_working_with_data.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,21 @@ Choose good names
| obs_01 | first_obs | 1st Obs. |


## An aside on cases in coding

![](images/allison_horst_cases.png){ width=80% }


## The janitor package handles suboptimal column names

* The [janitor](https://www.rdocumentation.org/packages/janitor/versions/2.2.1) package has an extremely useful function called `clean_names()` which will handle all of your gross header names for you

* From the `clean_names()` documentation:

<br>

<center>Resulting names are unique and consist only of the _ character, numbers, and letters. Capitalization preferences can be specified using the case parameter.</center>

## Organizing data in spreadsheets | Broman & Woo (2018)

No empty cells -- use `NA` or some other placeholder
Expand Down
19 changes: 19 additions & 0 deletions lectures/week_03/lec_09_working_with_data.html

Large diffs are not rendered by default.

0 comments on commit 6ff909f

Please sign in to comment.