Skip to content

Commit

Permalink
cleanup
Browse files Browse the repository at this point in the history
- fix markdown
- fix links
- fix html
  • Loading branch information
jrnold committed Jan 17, 2019
1 parent bee633d commit eb8a610
Show file tree
Hide file tree
Showing 9 changed files with 10 additions and 24 deletions.
2 changes: 0 additions & 2 deletions datetimes.Rmd
Expand Up @@ -440,5 +440,3 @@ as.Date("2016-02-29") + years(1)
## Time Zones {#time-zones .r4ds-section}

`r no_exercises()`

<div><!-- open unclosed div -->
8 changes: 3 additions & 5 deletions index.Rmd
Expand Up @@ -113,17 +113,15 @@ hypothesis_contribs <- function() {
These solutions have benefited from many contributors.
A special thanks to:

- Garrett Grolemund and Hadley Wickham for writing the truly fantastic *R for Data Science* , without which these solutions would not exist---literally.

- [\@dongzhuoer](https://github.com/dongzhuoer) for a careful reading of the book and noticing numerous issues and proposing fixes.
- Garrett Grolemund and Hadley Wickham for writing the truly fantastic *R for Data Science* , without which these solutions would not exist---literally.

- [\@dongzhuoer](https://github.com/dongzhuoer) for a careful reading of the book and noticing numerous issues and proposing fixes.

Thank you to all of those who contributed issues or pull-requests on
[GitHub](https://github.com/jrnold/r4ds-exercise-solutions/graphs/contributors)
(in alphabetical order): `r github_contribs()`
Thank you to all of you who contributed annotations on [hypothes.is](https://hypothes.is/search?q=url%3Ajrnold.github.io%2Fr4ds-exercise-solutions%2F*) (in alphabetical order): `r hypothesis_contribs()`.


##
## License {-}

This work is licensed under a <a rel="license" href="http://creativecommons.org/licenses/by/4.0/">Creative Commons Attribution 4.0 International License</a>
4 changes: 1 addition & 3 deletions intro.Rmd
Expand Up @@ -18,7 +18,7 @@ If exercises depend on code in a section of *R for Data Science* it is either pr
If a package is used infrequently in solutions it may not be loaded, and functions using it will be called using the package name followed by two colons, as in `dplyr::mutate()` (see the *R for Data Science* [Introduction](http://r4ds.had.co.nz/introduction.html#running-r-code)).
The double colon may also be used to be explicit about the package from which a function comes.

## Prerequisites
## Prerequisites {-}

This book is a complement to, not a substitute of, [R for Data Science]().
It only provides the exercise solutions for it.
Expand Down Expand Up @@ -58,5 +58,3 @@ This book was built with these R packages.
```{r colonophon}
devtools::session_info("r4ds.exercise.solutions")
```

<div><!-- open unclosed div -->
4 changes: 1 addition & 3 deletions iteration.Rmd
Expand Up @@ -669,7 +669,7 @@ Write code that uses one of the map functions to:
```
Since a single call of `rnorm()` returns a numeric vector with a length greater
than one we cannot use `map_dbl`, which requires the function to return a numeric
vector that is only length one (see [Exercise 21.5.4](exercise-21.5.4)).
vector that is only length one (see [Exercise 21.5.4](#exercise-21.5.4)).
The map functions pass any additional arguments to the function being called.

</div>
Expand Down Expand Up @@ -934,5 +934,3 @@ The `sapply()` function tries to be helpful by simplifying the results, but this
It is okay to use the `sapply()` function interactively, but avoid programming with it.

</div>

<div><!-- open unclosed div -->
2 changes: 0 additions & 2 deletions many-models.Rmd
Expand Up @@ -270,5 +270,3 @@ Lists are not atomic since they can contain other lists and other vectors.
## Making tidy data with broom {#making-tidy-data-with-broom .r4ds-section}

`r no_exercises()`

<div><!-- open unclosed div -->
2 changes: 0 additions & 2 deletions rmarkdown-workflow.Rmd
@@ -1,5 +1,3 @@
# R Markdown workflow {#r-markdown-workflow .r4ds-section}

`r no_exercises()`

<div><!-- close unopened div -->
8 changes: 4 additions & 4 deletions rmarkdown.Rmd
Expand Up @@ -245,7 +245,7 @@ Check that you can run it, then add text after the frequency polygon that descri

<div class="answer">

The following R markdown document answers this question as well as exercises [Exercise 27.4.1](exercise-27.4.1), [Exercise 27.4.2](exercise-27.4.2), and [Exercise 27.4.3](exercise-27.4.3).
The following R markdown document answers this question as well as exercises [Exercise 27.4.1](#exercise-27.4.1), [Exercise 27.4.2](#exercise-27.4.2), and [Exercise 27.4.3](#exercise-27.4.3).

```{r diamond-sizes,echo=FALSE,comment='',purl=FALSE}
cat(readr::read_file(here::here("rmarkdown", "diamond-sizes.Rmd")))
Expand All @@ -264,7 +264,7 @@ Assume you’re writing a report for someone who doesn’t know R, and instead o

<div class="answer">

See the answer to [Exercise 27.3.3](exercise-27.3.3).
See the answer to [Exercise 27.3.3](#exercise-27.3.3).

</div>

Expand All @@ -277,7 +277,7 @@ Add a section that describes the largest 20 diamonds, including a table that dis

<div class="answer">

See the answer to [Exercise 27.3.3](exercise-27.3.3).
See the answer to [Exercise 27.3.3](#exercise-27.3.3).
I use `arrange()` and `slice()` to select the largest twenty diamonds, and
`knitr::kable()` to produce a formatted table.

Expand All @@ -292,7 +292,7 @@ Also include the percentage of diamonds that are larger than 2.5 carats.

<div class="answer">

See the answer to [Exercise 27.3.3](exercise-27.3.3).
See the answer to [Exercise 27.3.3](#exercise-27.3.3).

I moved the computation of the number larger and percent of diamonds larger than 2.5 carats into a code chunk.
I find that it is best to keep inline R expressions simple, usually consisting of an object and a formatting function.
Expand Down
2 changes: 1 addition & 1 deletion visualize.Rmd
Expand Up @@ -347,7 +347,7 @@ Aesthetics can also be mapped to expressions like `displ < 5`.
The `ggplot()` function behaves as if a temporary variable was added to the data with with values equal to the result of the expression.
In this case, the result of `displ < 5` is a logical variable which takes values of `TRUE` or `FALSE`.

This also explains why, in [Exercise 3.3.1](exercise-3.3.1), the expression `colour = "blue"` created a categorical variable with only one category: "blue".
This also explains why, in [Exercise 3.3.1](#exercise-3.3.1), the expression `colour = "blue"` created a categorical variable with only one category: "blue".

</div>

Expand Down
2 changes: 0 additions & 2 deletions workflow-projects.Rmd
@@ -1,5 +1,3 @@
# Workflow: projects {#workflow-projects .r4ds-section}

`r no_exercises()`

<div><!-- open unclosed div -->

0 comments on commit eb8a610

Please sign in to comment.