Skip to content

Commit

Permalink
Fix typos
Browse files Browse the repository at this point in the history
  • Loading branch information
MichaelChirico authored Aug 8, 2023
1 parent 5fa4410 commit ec234f3
Show file tree
Hide file tree
Showing 21 changed files with 26 additions and 26 deletions.
4 changes: 2 additions & 2 deletions NEWS.md
Original file line number Diff line number Diff line change
Expand Up @@ -233,7 +233,7 @@

* Removed dependency on assertthat (@mgirlich, #1112).

* `across()` now uses the original value when a column is overriden to match
* `across()` now uses the original value when a column is overridden to match
the behaviour of dplyr. For example `mutate(df, across(c(x, y), ~ .x / x))`
now produces

Expand Down Expand Up @@ -1499,7 +1499,7 @@ generating reprexes.
* `copy_to()` now succeeds for MySQL if a character column contains `NA`
(#1975, #2256, #2263, #2381, @demorenoc, @eduardgrebe).

* `copy_to()` now returns it's output invisibly (since you're often just
* `copy_to()` now returns its output invisibly (since you're often just
calling for the side-effect).
* `distinct()` reports improved variable information for SQL backends. This
Expand Down
2 changes: 1 addition & 1 deletion R/db.R
Original file line number Diff line number Diff line change
Expand Up @@ -153,7 +153,7 @@ print.dbplyr_sql_options <- function(x, ...) {
if (x$qualify_all_columns) {
join_table_name <- "Qualify all columns"
} else {
join_table_name <- "Qualify only ambigous columns"
join_table_name <- "Qualify only ambiguous columns"
}

msg <- c(cte, star, join_table_name)
Expand Down
4 changes: 2 additions & 2 deletions R/schema.R
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
#' # Example using schemas with SQLite
#' con <- DBI::dbConnect(RSQLite::SQLite(), ":memory:")
#'
#' # Add auxilary schema
#' # Add auxiliary schema
#' tmp <- tempfile()
#' DBI::dbExecute(con, paste0("ATTACH '", tmp, "' AS aux"))
#'
Expand Down Expand Up @@ -91,7 +91,7 @@ as.sql.Id <- function(x, con) ident_q(dbQuoteIdentifier(con, x))

# Old dbplyr approach -----------------------------------------------------

#' Declare a identifer as being pre-quoted.
#' Declare a identifier as being pre-quoted.
#'
#' No longer needed; please use [sql()] instead.
#'
Expand Down
2 changes: 1 addition & 1 deletion R/translate-sql-helpers.R
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,7 @@ copy_env <- function(from, to = NULL, parent = parent.env(from)) {
#' @export
sql_infix <- function(f, pad = TRUE) {
# Unquoting involving infix operators easily create abstract syntax trees
# without parantheses where they are needed for printing and translation.
# without parentheses where they are needed for printing and translation.
# For example `expr(!!expr(2 - 1) * x))`
#
# See https://adv-r.hadley.nz/quasiquotation.html#non-standard-ast
Expand Down
2 changes: 1 addition & 1 deletion R/translate-sql-window.R
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
#' the grouping and order context set up by [group_by()] and [arrange()].
#'
#' @param expr The window expression
#' @param parition Variables to partition over
#' @param partition Variables to partition over
#' @param order Variables to order by
#' @param frame A numeric vector of length two defining the frame.
#' @param f The name of an sql function as a string
Expand Down
4 changes: 2 additions & 2 deletions R/verb-fill.R
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,7 @@ dbplyr_fill0.SQLiteConnection <- function(.con,
#
# strategy:
# for each column to fill:
# 1. generate a helper column `....dbplyr_partion_x`. It creates one partition
# 1. generate a helper column `....dbplyr_partition_x`. It creates one partition
# per non-NA value and all following NA (in the order of `order_by_cols`),
# i.e. each partition has exactly one non-NA value and any number of NA.
# 2. use the non-NA value in each partition (`max()` is just the simplest
Expand All @@ -151,7 +151,7 @@ dbplyr_fill0.SQLiteConnection <- function(.con,
vars_group = op_grps(.data),
)
) %>%
set_names(paste0("..dbplyr_partion_", seq_along(cols_to_fill)))
set_names(paste0("..dbplyr_partition_", seq_along(cols_to_fill)))

dp <- .data %>%
mutate(!!!partition_sql)
Expand Down
2 changes: 1 addition & 1 deletion R/verb-pivot-longer.R
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
#'
#' 1. split the specification by its key columns i.e. by variables crammed
#' into the column names.
#' 2. for each part in the splitted specification `transmute()` `data` into the
#' 2. for each part in the split specification `transmute()` `data` into the
#' following columns
#' * id columns i.e. columns that are not pivotted
#' * key columns
Expand Down
2 changes: 1 addition & 1 deletion README.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ install.packages("tidyverse")
# Alternatively, install just dbplyr:
install.packages("dbplyr")
# Or the the development version from GitHub:
# Or the development version from GitHub:
# install.packages("devtools")
devtools::install_github("tidyverse/dbplyr")
```
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ install.packages("tidyverse")
# Alternatively, install just dbplyr:
install.packages("dbplyr")

# Or the the development version from GitHub:
# Or the development version from GitHub:
# install.packages("devtools")
devtools::install_github("tidyverse/dbplyr")
```
Expand Down
2 changes: 1 addition & 1 deletion man/ident_q.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion man/in_schema.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion tests/testthat/_snaps/tidyeval-across.md
Original file line number Diff line number Diff line change
Expand Up @@ -174,7 +174,7 @@
SELECT `df`.*, (`a` > 0.0 OR `b` > 0.0) AS `c`
FROM `df`

# if_all/any uses every colum as default
# if_all/any uses every column as default

Code
lf %>% filter(if_all(.fns = ~ . > 0))
Expand Down
2 changes: 1 addition & 1 deletion tests/testthat/test-backend-.R
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
test_that("base_no_win inclues all aggregates and window funcitons", {
test_that("base_no_win includes all aggregates and window functions", {
# All aggregates must be included in window functions
expect_equal(setdiff(names(base_agg), names(base_win)), character())

Expand Down
2 changes: 1 addition & 1 deletion tests/testthat/test-escape.R
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ test_that("zero length inputs yield length-1 output when collapsed", {

# Numeric ------------------------------------------------------------------

test_that("missing vaues become null", {
test_that("missing values become null", {
con <- simulate_dbi()

expect_equal(escape(NA, con = con), sql("NULL"))
Expand Down
6 changes: 3 additions & 3 deletions tests/testthat/test-tidyeval-across.R
Original file line number Diff line number Diff line change
Expand Up @@ -433,7 +433,7 @@ test_that("if_all() gives informative errors", {
})
})

test_that("if_all collapses multiple expresions", {
test_that("if_all collapses multiple expressions", {
lf <- lazy_frame(a = 1, b = 2)
expect_equal(
capture_if_all(lf, if_all(everything(), is.na)),
Expand All @@ -448,7 +448,7 @@ test_that("if_all/any works in filter()", {
expect_snapshot(lf %>% filter(if_any(a:b, ~ . > 0)))
})

test_that("if_all/any is wrapped in parantheses #1153", {
test_that("if_all/any is wrapped in parentheses #1153", {
lf <- lazy_frame(a = 1, b = 2, c = 3)

expect_equal(
Expand All @@ -464,7 +464,7 @@ test_that("if_all/any works in mutate()", {
expect_snapshot(lf %>% mutate(c = if_any(a:b, ~ . > 0)))
})

test_that("if_all/any uses every colum as default", {
test_that("if_all/any uses every column as default", {
lf <- lazy_frame(a = 1, b = 2)

expect_snapshot(lf %>% filter(if_all(.fns = ~ . > 0)))
Expand Down
2 changes: 1 addition & 1 deletion tests/testthat/test-translate-sql-helpers.R
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ test_that("win_rank() is accepted by the sql_translator", {
)
})

test_that("can translate infix expression without parantheses", {
test_that("can translate infix expression without parentheses", {
local_con(simulate_dbi())
expect_equal(test_translate_sql(!!expr(2 - 1) * x), sql("(2.0 - 1.0) * `x`"))
expect_equal(test_translate_sql(!!expr(2 / 1) * x), sql("(2.0 / 1.0) * `x`"))
Expand Down
2 changes: 1 addition & 1 deletion tests/testthat/test-translate-sql-string.R
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ test_that("sql_str_sub works as expected", {
expect_equal(str_sub(x, -3, -3), sql("SUBSTR(`x`, LENGTH(`x`) - 2, 1)"))
})

test_that("sql_str_sub can require length paramter", {
test_that("sql_str_sub can require length parameter", {
local_con(simulate_dbi())
x <- ident("x")
str_sub <- sql_str_sub("SUBSTR", optional_length = FALSE)
Expand Down
2 changes: 1 addition & 1 deletion tests/testthat/test-utils.R
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
test_that("Succesful and not-sucessful commands are identified", {
test_that("Successful and not-successful commands are identified", {
expect_true(succeeds("success"))
expect_false(succeeds(x - 1, quiet = TRUE))
})
Expand Down
2 changes: 1 addition & 1 deletion tests/testthat/test-verb-distinct.R
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ test_that("distinct for single column equivalent to local unique (#1937)", {
expect_equal_tbls(unique(df["y"]))
})

test_that("distinct doesn't duplicate colum names if grouped (#354)", {
test_that("distinct doesn't duplicate column names if grouped (#354)", {
df <- lazy_frame(a = 1)
expect_equal(df %>% group_by(a) %>% distinct() %>% op_vars(), "a")
})
Expand Down
2 changes: 1 addition & 1 deletion tests/testthat/test-verb-mutate.R
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,7 @@ test_that("across() can access previously created variables", {
expect_snapshot(remote_query(lf))
})

test_that("across() uses original column rather than overriden one", {
test_that("across() uses original column rather than overridden one", {
db <- memdb_frame(x = 2, y = 4, z = 6)
expect_equal(
db %>% mutate(across(everything(), ~ .x / x)) %>% collect(),
Expand Down
2 changes: 1 addition & 1 deletion tests/testthat/test-verb-pivot-wider.R
Original file line number Diff line number Diff line change
Expand Up @@ -228,7 +228,7 @@ test_that("known bug - building a wider spec with a zero row data frame loses `v
)
})

# non-unqiue keys ---------------------------------------------------------
# non-unique keys ---------------------------------------------------------

test_that("values_fn can be a single function", {
df <- lazy_frame(a = c(1, 1, 2), key = c("x", "x", "x"), val = c(1, 10, 100))
Expand Down

0 comments on commit ec234f3

Please sign in to comment.