Skip to content

Commit

Permalink
Update Reproducibility.Rmd
Browse files Browse the repository at this point in the history
  • Loading branch information
clifmckee committed Jan 7, 2025
1 parent f9ab66e commit 190d96f
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions modules/Reproducibility/Reproducibility.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ ottrpal::include_slide("https://docs.google.com/presentation/d/1-cauITbscmnDEDt5

##

```{r, fig.alt="session info", out.width = "90%", echo = FALSE, fig.align='center'}
```{r, fig.alt="session info", out.width = "70%", echo = FALSE, fig.align='center'}
knitr::include_graphics("../../images/lol/reproducibility.jpg")
```

Expand Down Expand Up @@ -148,9 +148,12 @@ knitr::include_graphics("images/error_monster.png")
Provide sufficient detail so that you can understand what you did and why.

```{r, echo = TRUE}
# Taking a random sample of 100 individuals from the population WITHOUT replacement
# Taking a random sample of 100 individuals from the population
# WITHOUT replacement
samp_pop <- sample(100, replace = FALSE)
# Then split them into two groups of 50
# a[x:xx] is the syntax for indexing a vector
samp_pop1 <- samp_pop[1:50]
samp_pop2 <- samp_pop[51:100]
```
Expand All @@ -161,7 +164,7 @@ knitr::include_graphics("images/R_hearts.gif")

## Need random numbers to stay consistent?

Use `set.seed()` : sets the starting state for the random number generator (RNG) in R.
Use `set.seed()`: sets the starting state for the random number generator.

```{r, echo = TRUE}
set.seed(123)
Expand Down

0 comments on commit 190d96f

Please sign in to comment.