Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Draft: Setting up chapter #31

Merged
merged 6 commits into from
Nov 13, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
66 changes: 66 additions & 0 deletions 05-setting-up.Rmd
Original file line number Diff line number Diff line change
@@ -0,0 +1,66 @@

# Setting up your project

```{r, include = FALSE}
ottrpal::set_knitr_image_path()
```

```{r, fig.align='center', out.width="100%", echo = FALSE, fig.alt= "Major point!! example image"}
ottrpal::include_slide("https://docs.google.com/presentation/d/1MNHf8JpolaEP_vQ_kB-1xRBF9wo3haCArRu117hBoHA/edit#slide=id.g21a84b32106_0_13")
```



## Understand why project organization is key to reproducible analyses

```{r, fig.align='center', out.width="100%", echo = FALSE, fig.alt= "Major point!! example image"}
ottrpal::include_slide("https://docs.google.com/presentation/d/1MNHf8JpolaEP_vQ_kB-1xRBF9wo3haCArRu117hBoHA/edit#slide=id.g2fea8805c08_0_1121")
```

## Understand general principles of project organization

```{r, fig.align='center', out.width="100%", echo = FALSE, fig.alt= "Major point!! example image"}
ottrpal::include_slide("https://docs.google.com/presentation/d/1MNHf8JpolaEP_vQ_kB-1xRBF9wo3haCArRu117hBoHA/edit#slide=id.g2fea8805c08_0_421")
```

```{r, fig.align='center', out.width="100%", echo = FALSE, fig.alt= "Major point!! example image"}
ottrpal::include_slide("https://docs.google.com/presentation/d/1MNHf8JpolaEP_vQ_kB-1xRBF9wo3haCArRu117hBoHA/edit#slide=id.g2fea8805c08_0_426")
```

```{r, fig.align='center', out.width="100%", echo = FALSE, fig.alt= "Major point!! example image"}
ottrpal::include_slide("https://docs.google.com/presentation/d/1MNHf8JpolaEP_vQ_kB-1xRBF9wo3haCArRu117hBoHA/edit#slide=id.g2fea8805c08_0_442")
```

https://github.com/jhudsl/reproducible-r-example

## Navigate file paths

```{r, fig.align='center', out.width="100%", echo = FALSE, fig.alt= "Major point!! example image"}
ottrpal::include_slide("https://docs.google.com/presentation/d/1MNHf8JpolaEP_vQ_kB-1xRBF9wo3haCArRu117hBoHA/edit#slide=id.g2fea8805c08_0_1337")
```

## Handy R Tools

### here package

<blockquote class="twitter-tweet"><p lang="en" dir="ltr">The only two things that make <a href="https://twitter.com/JennyBryan?ref_src=twsrc%5Etfw">@JennyBryan</a> 😤😠🤯. Instead use projects + here::here() <a href="https://twitter.com/hashtag/rstats?src=hash&amp;ref_src=twsrc%5Etfw">#rstats</a> <a href="https://t.co/GwxnHePL4n">pic.twitter.com/GwxnHePL4n</a></p>&mdash; Hadley Wickham (@hadleywickham) <a href="https://twitter.com/hadleywickham/status/940021008764846080?ref_src=twsrc%5Etfw">December 11, 2017</a></blockquote> <script async src="https://platform.twitter.com/widgets.js" charset="utf-8"></script>

https://here.r-lib.org/

https://www.tidyverse.org/blog/2017/12/workflow-vs-script/

### RProj files

https://bookdown.org/ndphillips/YaRrr/projects-in-rstudio.html

### ProjectTemplate

http://projecttemplate.net/

### R Markdown files

https://rmarkdown.rstudio.com/articles_intro.html

### Quarto files

https://quarto.org/docs/get-started/hello/rstudio.html
File renamed without changes.
10 changes: 0 additions & 10 deletions 06-setting-up.Rmd

This file was deleted.

4 changes: 2 additions & 2 deletions _bookdown.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@ rmd_files: ["index.Rmd",
"02-why-R.Rmd",
"03-components.Rmd",
"04-rstudio-tour.Rmd",
"05-rmarkdown.Rmd",
#"06-setting-up.Rmd",
"05-setting-up.Rmd",
"06-rmarkdown.Rmd",
"07-code.Rmd",
"08-github-workflow.Rmd",
"09-software-versions.Rmd",
Expand Down
4 changes: 2 additions & 2 deletions quizzes/quiz_ch3.md
Original file line number Diff line number Diff line change
Expand Up @@ -44,14 +44,14 @@ m) It helps others to be able to publish conclusions about our data
m) It exposes personal identifiable information to the public

{choose-answers: 4}
? Which of the following is correct about this statement - if your data has PHI or PII you cannot make your analysis open source or reproducible.
? Which of the following is correct about this statement - if your data has protected data that you cannot make your analysis open source or reproducible.

C) These are not mutually exclusive goals! Some thoughtful planning and use of controlled access methods can ensure that all individuals' data are well protected!
C) You can protect data and not share it, but share the code in a careful manner that does not expose details about the data.
o) You can make your analysis reproducible but not open source
o) You can make your analysis open source but not reproducible
m) There are no methods that will allow you to share your methods and data in a safe way.
m) Sharing your code is always unsafe when it comes to PHI or PII
m) Sharing your code is always unsafe when it comes to protected data


{/quiz}
5 changes: 5 additions & 0 deletions resources/dictionary.txt
Original file line number Diff line number Diff line change
Expand Up @@ -74,9 +74,14 @@ NIGMS
ottrpal
Pandoc
PBC
PII
ProjectTemplate
reproducibility
RStudio
rstudio
rmarkdown
Rmarkdown
RProj
Sys
UE
UE5
Expand Down
Loading