Skip to content

Commit

Permalink
Fix misspellings (#6191)
Browse files Browse the repository at this point in the history
* Fix misspellings

* Apply suggested changes from feedback

* Fix misspellings in NEWS files as well

* approve suggestion

Co-authored-by: Rafael Fontenelle <rffontenelle@users.noreply.github.com>

---------

Co-authored-by: Michael Chirico <michaelchirico4@gmail.com>
  • Loading branch information
rffontenelle and MichaelChirico authored Jun 23, 2024
1 parent 035fe77 commit a2e20d6
Show file tree
Hide file tree
Showing 33 changed files with 108 additions and 108 deletions.
2 changes: 1 addition & 1 deletion NAMESPACE
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,7 @@ S3method(melt, default)

# exported for historical reasons -- if reshape2 is higher on search path,
# dcast(DT) will not dispatch since reshape2::dcast is not generic. So users
# and many packges on CRAN call dcast.data.table() and/or melt.data.table() directly. See #3082.
# and many packages on CRAN call dcast.data.table() and/or melt.data.table() directly. See #3082.
export(melt.data.table, dcast.data.table)

importFrom(utils, capture.output, contrib.url, download.file, flush.console, getS3method, head, packageVersion, tail, untar, unzip)
Expand Down
32 changes: 16 additions & 16 deletions NEWS.0.md

Large diffs are not rendered by default.

22 changes: 11 additions & 11 deletions NEWS.1.md

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion NEWS.md
Original file line number Diff line number Diff line change
Expand Up @@ -371,7 +371,7 @@

34. `weighted.mean()` is now optimized by group, [#3977](https://github.com/Rdatatable/data.table/issues/3977). Thanks to @renkun-ken for requesting, and Benjamin Schwendinger for the PR.

35. `as.xts.data.table()` now supports non-numeric xts coredata matrixes, [5268](https://github.com/Rdatatable/data.table/issues/5268). Existing numeric only functionality is supported by a new `numeric.only` parameter, which defaults to `TRUE` for backward compatability and the most common use case. To convert non-numeric columns, set this parameter to `FALSE`. Conversions of `data.table` columns to a `matrix` now uses `data.table::as.matrix`, with all its performance benefits. Thanks to @ethanbsmith for the report and fix.
35. `as.xts.data.table()` now supports non-numeric xts coredata matrixes, [5268](https://github.com/Rdatatable/data.table/issues/5268). Existing numeric only functionality is supported by a new `numeric.only` parameter, which defaults to `TRUE` for backward compatibility and the most common use case. To convert non-numeric columns, set this parameter to `FALSE`. Conversions of `data.table` columns to a `matrix` now uses `data.table::as.matrix`, with all its performance benefits. Thanks to @ethanbsmith for the report and fix.

36. `unique.data.table()` gains `cols` to specify a subset of columns to include in the resulting `data.table`, [#5243](https://github.com/Rdatatable/data.table/issues/5243). This saves the memory overhead of subsetting unneeded columns, and provides a cleaner API for a common operation previously needing more convoluted code. Thanks to @MichaelChirico for the suggestion & implementation.

Expand Down
4 changes: 2 additions & 2 deletions R/data.table.R
Original file line number Diff line number Diff line change
Expand Up @@ -1523,7 +1523,7 @@ replace_dot_alias = function(e) {
}
if (verbose) {cat(timetaken(last.started.at),"\n"); flush.console()}
}
if (!orderedirows && !length(o__)) o__ = seq_len(xnrow) # temp fix. TODO: revist orderedirows
if (!orderedirows && !length(o__)) o__ = seq_len(xnrow) # temp fix. TODO: revisit orderedirows
} else {
if (verbose) last.started.at=proc.time();
if (bysameorder) {
Expand Down Expand Up @@ -2726,7 +2726,7 @@ chorder = function(x) {
}

chgroup = function(x) {
# TO DO: deprecate and remove this. It's exported but doubt anyone uses it. Think the plan was to use it internally, but forderv superceded.
# TO DO: deprecate and remove this. It's exported but doubt anyone uses it. Think the plan was to use it internally, but forderv superseded.
o = forderv(x, sort=FALSE, retGrp=TRUE)
if (length(o)) as.vector(o) else seq_along(x) # as.vector removes the attributes
}
Expand Down
2 changes: 1 addition & 1 deletion R/foverlaps.R
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ foverlaps = function(x, y, by.x=if (!is.null(key(x))) key(x) else key(y), by.y=k
yclass = c(class(yval1), class(yval2))
isdouble = FALSE; isposix = FALSE
if ( any(c("numeric", "POSIXct") %chin% yclass) ) {
# next representive double > x under the given precision (48,56 or 64-bit in data.table) = x*incr
# next representative double > x under the given precision (48,56 or 64-bit in data.table) = x*incr
dt_eps = function() {
bits = floor(log2(.Machine$double.eps))
2 ^ (bits + (getNumericRounding() * 8L))
Expand Down
2 changes: 1 addition & 1 deletion R/print.data.table.R
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ print.data.table = function(x, topn=getOption("datatable.print.topn"),
quote=FALSE,
na.print=NULL,
timezone=FALSE, ...) {
# topn - print the top topn and bottom topn rows with '---' inbetween (5)
# topn - print the top topn and bottom topn rows with '---' in between (5)
# nrows - under this the whole (small) table is printed, unless topn is provided (100)
# class - should column class be printed underneath column name? (FALSE)
# trunc.cols - should only the columns be printed that can fit in the console? (FALSE)
Expand Down
2 changes: 1 addition & 1 deletion R/setops.R
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ setdiff_ = function(x, y, by.x=seq_along(x), by.y=seq_along(y), use.names=FALSE)
if (!nrow(y)) return(unique(x, by=by.x))
by.y = colnamesInt(y, by.y, check_dups=TRUE)
if (length(by.x) != length(by.y)) stopf("length(by.x) != length(by.y)")
# factor in x should've factor/character in y, and viceversa
# factor in x should've factor/character in y, and vice-versa
for (a in seq_along(by.x)) {
lc = by.y[a]
rc = by.x[a]
Expand Down
2 changes: 1 addition & 1 deletion R/test.data.table.R
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,7 @@ test.data.table = function(script="tests.Rraw", verbose=FALSE, pkg=".", silent=F
assign("prevtest", -1L, envir=env)
assign("whichfail", NULL, envir=env)
assign("started.at", proc.time(), envir=env)
assign("lasttime", proc.time()[3L], envir=env) # used by test() to attribute time inbetween tests to the next test
assign("lasttime", proc.time()[3L], envir=env) # used by test() to attribute time in between tests to the next test
assign("timings", data.table( ID = seq_len(9999L), time=0.0, nTest=0L, RSS=0.0 ), envir=env) # test timings aggregated to integer id
assign("memtest", memtest, envir=env)
assign("memtest.id", memtest.id, envir=env)
Expand Down
2 changes: 1 addition & 1 deletion R/transpose.R
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ tstrsplit = function(x, ..., fill=NA, type.convert=FALSE, keep, names=FALSE) {
if (length(others))
ans[others] = lapply(ans[others], fothers)
else
warningf("In the argument 'type.convert', '%s' was ignored because all elements in the transpose list or elements corrisponding to indices specified in the 'keep' argument have already been converted.", last_item)
warningf("In the argument 'type.convert', '%s' was ignored because all elements in the transpose list or elements corresponding to indices specified in the 'keep' argument have already been converted.", last_item)
}
for (fn in names(type.convert)) {
idx = type.convert[[fn]]
Expand Down
6 changes: 3 additions & 3 deletions inst/tests/programming.Rraw
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@ test(2.54, substitute2(c(list(v1=v2, v1=v3)), env=list(v1="nm",v2=2L,v3=3L)), qu
# substitute2 env as environment class
e = as.environment(list(v=1L, .v=2L))
test(2.81, substitute2(.(v, .v), e), quote(.(1L, 2L)))
# unline in base R substitute, the env arg is always evaluated
# unlike in base R substitute, the env arg is always evaluated
e = new.env()
delayedAssign("a_promise", stop("I am the error"), assign.env=e)
e$x = 5L
Expand All @@ -135,7 +135,7 @@ test(2.94, substitute2(.(v), structure(list(1L,2L), names=c("","v"))), error="'e
test(2.95, substitute2(.(v), structure(list(1,2), names=c(NA,"v"))), error="'env' argument has NA names")
test(2.96, substitute2(.(v), list(v=1,v=2)), error="'env' argument has duplicated names")

# substitute2 re-use inside another function
# substitute2 reuse inside another function
f = function(expr, env) {
eval(substitute(
substitute2(.expr, env),
Expand All @@ -153,7 +153,7 @@ cl = f(
)
)
test(3.01, cl, quote(.(sum_x = sum(x, na.rm = TRUE))))
# substitute2 nested re-use inside another function
# substitute2 nested reuse inside another function
cl = substitute2(list(nm = fun(.(out_col_name = fun(in_col_name, fun_arg1=fun_arg1val)),
env = list(
in_col_name = "x",
Expand Down
Loading

0 comments on commit a2e20d6

Please sign in to comment.