Skip to content

Commit

Permalink
Fix typo
Browse files Browse the repository at this point in the history
  • Loading branch information
jennybc committed May 15, 2018
1 parent 5e16ff0 commit 510b59f
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
4 changes: 2 additions & 2 deletions ex09_row-summaries.R
Original file line number Diff line number Diff line change
Expand Up @@ -68,14 +68,14 @@ df %>%
#'
#' * You might want to take the median or standard deviation instead of a mean
#' or a sum. You can't assume that base R or an add-on package offers a row-wise
#' implementation of every function you might need.
#' `data.frame` method for every function you might need.
#' * You might have several variables besides `name` that need to be retained,
#' but that should not be forwarded to `rowSums()` or `rowMeans()`. A
#' matrix-with-row-names grants you a reprieve for exactly one variable and that
#' variable best not be integer, factor, date, or datetime. Because you must
#' store it as character. It's not a general solution.
#' * Correctness. If you extract the numeric columns or the variables whose
#' names start with `"t"`, compute `rowMeans()` on them, and then column-binpd
#' names start with `"t"`, compute `rowMeans()` on them, and then column-bind
#' the result back to the data, you are responsible for making sure that the two
#' objects are absolutely, positively row-aligned.
#'
Expand Down
5 changes: 3 additions & 2 deletions ex09_row-summaries.md
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,8 @@ There are a few reasons:

- You might want to take the median or standard deviation instead of a
mean or a sum. You can’t assume that base R or an add-on package
offers a row-wise implementation of every function you might need.
offers a row-wise `data.frame` method for every function you might
need.
- You might have several variables besides `name` that need to be
retained, but that should not be forwarded to `rowSums()` or
`rowMeans()`. A matrix-with-row-names grants you a reprieve for
Expand All @@ -84,7 +85,7 @@ There are a few reasons:
a general solution.
- Correctness. If you extract the numeric columns or the variables
whose names start with `"t"`, compute `rowMeans()` on them, and then
column-binpd the result back to the data, you are responsible for
column-bind the result back to the data, you are responsible for
making sure that the two objects are absolutely, positively
row-aligned.

Expand Down

0 comments on commit 510b59f

Please sign in to comment.