No flags found
Use flags to group coverage reports by test type, project and/or folders.
Then setup custom commit statuses and notifications for each flag.
e.g., #unittest #integration
#production #enterprise
#frontend #backend
e80afed
... +0 ...
c594cb8
Use flags to group coverage reports by test type, project and/or folders.
Then setup custom commit statuses and notifications for each flag.
e.g., #unittest #integration
#production #enterprise
#frontend #backend
47 | 47 | #' @rdname bearing |
|
48 | 48 | #' @export |
|
49 | 49 | compass2bearing <- function(compass) { |
|
50 | - | if (length(compass) > 1) { |
|
51 | - | x <- res <- NULL |
|
52 | - | DT <- setDT(list(x = compass)) |
|
53 | - | DT[, res := compass2bearing(x), by = "x"] |
|
54 | - | return(.subset2(DT, "res")) |
|
55 | - | } |
|
56 | - | if (is.na(compass)) { |
|
57 | - | return(NA_real_) |
|
58 | - | } |
|
59 | - | ||
60 | - | switch(nchar(compass), |
|
61 | - | { |
|
62 | - | c(0, 90, 180, 270)[match(toupper(compass), c("N", "E", "S", "W"))] |
|
63 | - | }, |
|
64 | - | { |
|
65 | - | c(45, 135, 225, 315)[match(toupper(compass), c("NE", "SE", "SW", "NW"))] |
|
66 | - | }, |
|
67 | - | { |
|
68 | - | b1 <- substr(compass, 0, 1) |
|
69 | - | b2 <- substr(compass, 2, 3) |
|
70 | - | average_bearing(compass2bearing(b1), |
|
71 | - | compass2bearing(b2)) |
|
72 | - | }, |
|
73 | - | 0) |
|
74 | - | } |
|
75 | - | ||
76 | - | .compass2bearing <- function(compass) { |
|
77 | 50 | CompassNames <- c("CALM", |
|
78 | 51 | "E", "ENE", "ESE", |
|
79 | 52 | "N", |
Learn more Showing 1 files with coverage changes found.
R/bearing.R
Files | Coverage |
---|---|
R | +1.23% 99.60% |
Project Totals (53 files) | 99.60% |
#39
c594cb8
#39
e80afed