Skip to content

Commit 441af16

Browse files
committed
run styler
1 parent b25b4ae commit 441af16

File tree

8 files changed

+9
-17
lines changed

8 files changed

+9
-17
lines changed

R/preferred_poles.R

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
21
preferredPoles <- function(x) {
32
stop_if_not_is_repgrid(x)
43
left_is_preferred <- sapply(x@constructs, function(c) c$leftpole$preferred)
@@ -106,15 +105,17 @@ preferredPolesByIdeal <- function(x, ideal, none_range = NULL, align = FALSE) {
106105
#' @export
107106
#' @seealso [alignByLoadings()]
108107
#' @examples
109-
#' #TBD
108+
#' # TBD
110109
alignByPreferredPole <- function(x, side = "right") {
111110
stop_if_not_is_repgrid(x)
112111
side <- match.arg(side, c("left", "right"))
113112
preferred_poles <- preferredPoles(x)
114113
ii_na <- is.na(preferred_poles)
115114
if (any(ii_na)) {
116-
warning(c("Some construct do not have a preferred pole and were not aligned.\n",
117-
"See 'preferredPoles() to set a preference'"), call. = FALSE)
115+
warning(c(
116+
"Some construct do not have a preferred pole and were not aligned.\n",
117+
"See 'preferredPoles() to set a preference'"
118+
), call. = FALSE)
118119
}
119120
if (side == "left") {
120121
ii_reverse <- preferred_poles == "right"

R/repgrid-basicops.r

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@ stop_if_not_in_element_range <- function(x, element) {
7474
stop("element name '", element, " 'is not unknown", call. = FALSE)
7575
}
7676
if (is.numeric(element) && !is_integerish(element)) {
77-
stop("element index must be an integer", call. = FALSE)
77+
stop("element index must be an integer", call. = FALSE)
7878
}
7979
ii <- seq_along(.elements)
8080
if (is.numeric(element) && !element %in% ii) {
@@ -91,7 +91,7 @@ stop_if_not_integerish <- function(x, arg = NULL) {
9191
} else {
9292
argname <- ""
9393
}
94-
stop("Expected integerish value ", argname, "but got '", class(x)[1], "'", call. = FALSE)
94+
stop("Expected integerish value ", argname, "but got '", class(x)[1], "'", call. = FALSE)
9595
}
9696
}
9797

@@ -1616,7 +1616,7 @@ cbind.repgrid <- function(..., .reorder = TRUE, .unique = FALSE) {
16161616

16171617

16181618
bindElements <- function(..., .reorder = TRUE, .unique = FALSE) {
1619-
dots <- unlist(list(...)) # in case list of repgrid objects are supplied
1619+
dots <- unlist(list(...)) # in case list of repgrid objects are supplied
16201620
is.grid <- sapply(dots, function(x) inherits(x, "repgrid"))
16211621
.f <- function(x, y) {
16221622
bindTwoElements(x, y, .reorder = .reorder, .unique = .unique)

R/repgrid-output.r

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -529,7 +529,7 @@ df_out <- function(df, # data frame
529529
s_2 <- colorize("(-) = non-preferred", "red")
530530
s_3 <- colorize("(/) = none", "white")
531531
s_4 <- colorize("(.) = not defined", "white")
532-
cat("\nPoles:", paste(s_1, ",", s_2, ",",s_3, ",", s_4))
532+
cat("\nPoles:", paste(s_1, ",", s_2, ",", s_3, ",", s_4))
533533
}
534534
invisible(NULL)
535535
}

R/rgl-3d.r

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -149,7 +149,6 @@ biplot3dBase2 <- function(x, dim = 1:3, labels.e = TRUE, labels.c = TRUE, lines.
149149
lef = 1.1, frame = 1, col.frame = grey(.6),
150150
col.sphere = "black", alpha.sphere = .05, zoom = 1,
151151
draw.xyz.axes = TRUE, ...) {
152-
153152
if (!requireNamespace("rgl", quietly = TRUE)) {
154153
stop("The 'rgl' package is required to use OpenRepGrid's 3D features => please install 'rgl'.", call. = FALSE)
155154
}

tests/testthat/test-calc.R

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,5 @@
1-
21
# test for issues #22 and #31 (constructs were missing after align)
32
test_that("align()", {
4-
53
sorted_poles <- function(x) {
64
df_con <- constructs(x)
75
l <- as.list(as.data.frame(t(df_con))) # df rows as list

tests/testthat/test-helpers.R

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
test_that("stop_if_not_in_element_range", {
2-
32
expect_no_error({
43
stop_if_not_in_element_range(boeker, 1)
54
stop_if_not_in_element_range(boeker, "self")
@@ -11,6 +10,3 @@ test_that("stop_if_not_in_element_range", {
1110
expect_error(stop_if_not_in_element_range(boeker, "xxx"))
1211
expect_error(stop_if_not_in_element_range(boeker, 1.1))
1312
})
14-
15-
16-

tests/testthat/test-preferred-pole.R

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,4 +17,3 @@ test_that("preferredPoles", {
1717
preferredPoles(x) <- NA
1818
expect_equal(preferredPoles(x), rep_len(NA_character_, nc))
1919
})
20-

tests/testthat/test_biplot.R

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@ library(vdiffr)
33

44

55
test_that("biplots work", {
6-
76
create_biplot2d <- function() {
87
set.seed(0)
98
biplot2d(boeker)

0 commit comments

Comments
 (0)