Skip to content

Commit

Permalink
Correct an argument name
Browse files Browse the repository at this point in the history
Fixes #11
  • Loading branch information
jennybc committed Sep 5, 2018
1 parent 510b59f commit 232f199
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 11 deletions.
3 changes: 1 addition & 2 deletions iterate-over-rows.R
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@
#' * Explore different number of rows and columns, with mixed col types.

library(scales)
library(forcats)
library(tidyverse)

# for loop over row index
Expand Down Expand Up @@ -98,7 +97,7 @@ run_col_benchmark <- function(ncol, times = 5) {

## force figs to present methods in order of time
flevels <- function(df) {
mutate(df, method = fct_reorder(method, x = desc(time)))
mutate(df, method = fct_reorder(method, .x = desc(time)))
}

plot_it <- function(df, what = "nrow") {
Expand Down
17 changes: 8 additions & 9 deletions iterate-over-rows.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
Turn data frame into a list, one component per row
================
Jenny Bryan, updating work of Winston Chang
2018-04-10
2018-09-05

Update of <https://rpubs.com/wch/200398>.

Expand All @@ -13,18 +13,17 @@ Update of <https://rpubs.com/wch/200398>.

``` r
library(scales)
library(forcats)
library(tidyverse)
```

## ── Attaching packages ───────────────────────────────────────── tidyverse 1.2.1 ──
## ── Attaching packages ──────────────────────────────────── tidyverse 1.2.1 ──

## ✔ ggplot2 2.2.1 ✔ readr 1.1.1.9000
## ✔ tibble 1.4.2 ✔ purrr 0.2.4.9000
## ✔ tidyr 0.8.0 ✔ dplyr 0.7.4.9000
## ✔ ggplot2 2.2.1 ✔ stringr 1.3.0
## ✔ ggplot2 3.0.0 ✔ purrr 0.2.5
## ✔ tibble 1.4.2 ✔ dplyr 0.7.6
## ✔ tidyr 0.8.1 ✔ stringr 1.3.1
## ✔ readr 1.2.0 ✔ forcats 0.3.0

## ── Conflicts ──────────────────────────────────────────── tidyverse_conflicts() ──
## ── Conflicts ─────────────────────────────────────── tidyverse_conflicts() ──
## ✖ readr::col_factor() masks scales::col_factor()
## ✖ purrr::discard() masks scales::discard()
## ✖ dplyr::filter() masks stats::filter()
Expand Down Expand Up @@ -114,7 +113,7 @@ run_col_benchmark <- function(ncol, times = 5) {

## force figs to present methods in order of time
flevels <- function(df) {
mutate(df, method = fct_reorder(method, x = desc(time)))
mutate(df, method = fct_reorder(method, .x = desc(time)))
}

plot_it <- function(df, what = "nrow") {
Expand Down
Binary file modified iterate-over-rows_files/figure-gfm/col-benchmark-1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified iterate-over-rows_files/figure-gfm/row-benchmark-1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit 232f199

Please sign in to comment.