Skip to content

Commit

Permalink
lintr, styler, minor doc
Browse files Browse the repository at this point in the history
  • Loading branch information
etiennebacher committed Aug 30, 2023
1 parent 5fd51c8 commit 957dd35
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 21 deletions.
12 changes: 3 additions & 9 deletions R/standardize.R
Original file line number Diff line number Diff line change
Expand Up @@ -205,15 +205,9 @@ standardize.matrix <- function(x, ...) {
x_out <- do.call(cbind, xz)
dimnames(x_out) <- dimnames(x)

attr(x_out, "center") <- vapply(xz, function(x) {
attr(x, "center")
}, FUN.VALUE = numeric(1L))
attr(x_out, "scale") <- vapply(xz, function(x) {
attr(x, "scale")
}, FUN.VALUE = numeric(1L))
attr(x_out, "robust") <- vapply(xz, function(x) {
attr(x, "robust")
}, FUN.VALUE = logical(1L))[1]
attr(x_out, "center") <- vapply(xz, attr, "center", FUN.VALUE = numeric(1L))
attr(x_out, "scale") <- vapply(xz, attr, "scale", FUN.VALUE = numeric(1L))
attr(x_out, "robust") <- vapply(xz, attr, "robust", FUN.VALUE = logical(1L))[1]
class(x_out) <- c("dw_transformer", class(x_out))

x_out
Expand Down
13 changes: 3 additions & 10 deletions man/describe_distribution.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/means_by_group.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# meany_by_group
# mean_by_group

Code
means_by_group(efc, "c12hour", "e42dep")
Expand Down
2 changes: 1 addition & 1 deletion tests/testthat/_snaps/windows/means_by_group.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# meany_by_group, weighted
# mean_by_group, weighted

Code
means_by_group(efc, "c12hour", "e42dep", weights = "weight")
Expand Down

0 comments on commit 957dd35

Please sign in to comment.