Skip to content

Commit

Permalink
Update 4-minimal-reproducible-data.Rmd
Browse files Browse the repository at this point in the history
  • Loading branch information
xortizross committed Nov 6, 2024
1 parent 1419eb7 commit 3c5b941
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions episodes/4-minimal-reproducible-data.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,7 @@ It would be a lot easier for the IT support person to fix your computer if they
::: instructor

Check warning on line 66 in episodes/4-minimal-reproducible-data.Rmd

View workflow job for this annotation

GitHub Actions / Build markdown source files if valid

check for the corresponding close tag
You can use the next example as well if you choose.
:::

::: solution

Check warning on line 70 in episodes/4-minimal-reproducible-data.Rmd

View workflow job for this annotation

GitHub Actions / Build markdown source files if valid

check for the corresponding close tag
## Another example:
You're knitting a sweater and one of the sleeves looks wonky. You call a friend and ask why it's messed up. They can't possibly help without being able to hold the sweater and look at the stitches themselves.
Expand Down Expand Up @@ -126,11 +127,9 @@ c(xm, mean(x, trim = 0.10))
```

In this case, x is the dummy dataset consisting of just 1 variable. Notice how it was created as part of the example.

:::

:::: challenge

Check warning on line 132 in episodes/4-minimal-reproducible-data.Rmd

View workflow job for this annotation

GitHub Actions / Build markdown source files if valid

check for the corresponding close tag

### Exercise 1

These datasets are not well suited for use in a reprex.
Expand Down Expand Up @@ -185,6 +184,7 @@ B) does not produce the same problem (NA result with a warning message)--the co
D) is not reproducible. Sample randomly samples 10 items; sometimes it may include NAs, sometime it may not (not guaranteed to reproduce the error). It can be used if a seed is set (see next section for more info).
E) uses a dataset that isn't accessible without previous data wrangling code–the object rodents_modified doesn't exist.
:::
::::

## 4.3 How do I create a minimal reproducible dataset?

Expand Down Expand Up @@ -295,6 +295,7 @@ Try to answer the following questions oon your own and see if you can determine
1. To reproduce the figure, we can use 2-4 levels for one factors (species), and maybe 2 levels for the other factor (plot type) to keep it minimal. Our continuous variable could range 1 to 10 (date). We don't need too many observations, but we do have 2 categories, one with 4 levels. Let's make it an even 100.
1. NAs are not relevant to our problem
:::
::::

::: instructor
Maybe we don't need to include the solution and we just walk through it in the following section.
Expand Down Expand Up @@ -578,6 +579,7 @@ How might you reproduce this using the mpg dataset?
xlab("Class")
```
:::
::::

## 4.4 Using your own data by creating a minimal subset

Expand Down Expand Up @@ -640,6 +642,7 @@ D) sample_data <- ____
C) **?? + what's really the point of this one?**
D) `sample_data <- data.frame(x = factor(1:3), y = 4:6)`
:::
::::


::: keypoints
Expand Down

0 comments on commit 3c5b941

Please sign in to comment.