From 9d32f32af56e3fa4486892c9ad412bc43d3a889f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Kirill=20M=C3=BCller?= Date: Wed, 8 Apr 2015 16:22:48 +0200 Subject: [PATCH] spaces before parens --- R/each.r | 6 +++--- R/here.r | 2 +- R/rbind-fill.r | 2 +- tests/testthat/test-rbind.r | 6 +++--- 4 files changed, 8 insertions(+), 8 deletions(-) diff --git a/R/each.r b/R/each.r index e0b83867..826a1c9a 100644 --- a/R/each.r +++ b/R/each.r @@ -48,7 +48,7 @@ each <- function(...) { # If there is only one function, things are simple. We just # need to name the output, if appropriate. function(x, ...) { - res <- fs[[1]](x, ...) + res <- fs[[1]](x, ...) # nolint if (length(res) == 1) names(res) <- unames res } @@ -65,10 +65,10 @@ each <- function(...) { result <<- vector("list", length = n) names(result) <- unames - for (i in 1:n) result[[i]] <- fs[[i]](x, ...) + for (i in 1:n) result[[i]] <- fs[[i]](x, ...) # nolint proto <<- list_to_vector(result) } else { - for (i in 1:n) proto[[i]] <- fs[[i]](x, ...) + for (i in 1:n) proto[[i]] <- fs[[i]](x, ...) # nolint } proto } diff --git a/R/here.r b/R/here.r index 8718b78e..61ed35eb 100644 --- a/R/here.r +++ b/R/here.r @@ -21,7 +21,7 @@ #' f2("name:") #' # Works :) here <- function(f) { - call <- substitute(function(...) (f)(...), list(f = f)) + call <- substitute(function(...) (f)(...), list(f = f)) # nolint fun <- eval(call, parent.frame()) attr(fun, "srcref") <- srcfilecopy("", deparse(call)) fun diff --git a/R/rbind-fill.r b/R/rbind-fill.r index 4ae025f3..bf38c855 100644 --- a/R/rbind-fill.r +++ b/R/rbind-fill.r @@ -67,7 +67,7 @@ rbind.fill <- function(...) { df <- dfs[[i]] for (var in names(df)) { - setters[[var]](rng, df[[var]]) + setters[[var]](rng, df[[var]]) # nolint } } diff --git a/tests/testthat/test-rbind.r b/tests/testthat/test-rbind.r index aef2155f..076a18a4 100644 --- a/tests/testthat/test-rbind.r +++ b/tests/testthat/test-rbind.r @@ -286,19 +286,19 @@ expect_linear_enough <- function(timings, size=2^10, threshold=0.2) { } test_that("rbind.fill performance linear", { - timings <- get_rbind_times(data.frame(size = 2^(1:10)), + timings <- get_rbind_times(data.frame(size = 2 ^ (1:10)), classes=c("numeric", "character", "array")) expect_linear_enough(timings) }) test_that("rbind.fill performance linear with factors", { - timings <- get_rbind_times(data.frame(size = 2^(1:10)), + timings <- get_rbind_times(data.frame(size = 2 ^ (1:10)), classes=c("factor")) expect_linear_enough(timings) }) test_that("rbind.fill performance linear with times", { - timings <- get_rbind_times(data.frame(size = 2^(1:10)), + timings <- get_rbind_times(data.frame(size = 2 ^ (1:10)), classes=c("time")) expect_linear_enough(timings) })