Skip to content

Commit 916e98f

Browse files
committed
style: styler (GHA)
1 parent b1f89ba commit 916e98f

File tree

2 files changed

+43
-36
lines changed

2 files changed

+43
-36
lines changed

R/avail_endpoints.R

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,10 @@
88
#' endps <- avail_endpoints()
99
#' print(endps, n = nrow(endps))
1010
avail_endpoints <- function() {
11-
h <- help.search("endpoint", package = "epidatr", fields = "concept",
12-
agrep = FALSE)$matches
11+
h <- help.search("endpoint",
12+
package = "epidatr", fields = "concept",
13+
agrep = FALSE
14+
)$matches
1315
tib <- tibble::tibble( # printing is much nicer than data.frame
1416
Endpoint = paste0(h$Name, "()"),
1517
Description = h$Title

R/covidcast.R

Lines changed: 39 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -64,31 +64,31 @@ parse_source <- function(source, base_url) {
6464
as.data.frame.covidcast_data_signal_list <- function(x, ...) {
6565
as.data.frame(
6666
do.call(rbind, lapply(x, function(z) {
67-
sub <- z[c(
68-
"source",
69-
"signal",
70-
"name",
71-
"active",
72-
"short_description",
73-
"description",
74-
"time_type",
75-
"time_label",
76-
"value_label",
77-
"format",
78-
"category",
79-
"high_values_are",
80-
"is_smoothed",
81-
"is_weighted",
82-
"is_cumulative",
83-
"has_stderr",
84-
"has_sample_size"
85-
)]
86-
sub$geo_types <- paste0(names(z$geo_types), collapse = ",")
87-
sub
88-
})
89-
),
90-
row.names = sapply(x, function(y) y$key),
91-
...)
67+
sub <- z[c(
68+
"source",
69+
"signal",
70+
"name",
71+
"active",
72+
"short_description",
73+
"description",
74+
"time_type",
75+
"time_label",
76+
"value_label",
77+
"format",
78+
"category",
79+
"high_values_are",
80+
"is_smoothed",
81+
"is_weighted",
82+
"is_cumulative",
83+
"has_stderr",
84+
"has_sample_size"
85+
)]
86+
sub$geo_types <- paste0(names(z$geo_types), collapse = ",")
87+
sub
88+
})),
89+
row.names = sapply(x, function(y) y$key),
90+
...
91+
)
9292
}
9393

9494
#' @export
@@ -157,21 +157,26 @@ covidcast_epidata <- function(base_url = global_base_url, timeout_seconds = 30)
157157
as.data.frame.covidcast_data_source_list <- function(x, ...) {
158158
as.data.frame(
159159
do.call(
160-
rbind,
160+
rbind,
161161
lapply(
162-
x,
162+
x,
163163
FUN = function(z) {
164-
cols <- c("source", "name", "description", "reference_signal",
165-
"license")
164+
cols <- c(
165+
"source", "name", "description", "reference_signal",
166+
"license"
167+
)
166168
sub <- z[cols]
167169
sub$signals <- paste0(
168-
sapply(z$signals, function(y) y$signal), collapse = ","
170+
sapply(z$signals, function(y) y$signal),
171+
collapse = ","
169172
)
170173
sub
171-
})
172-
),
173-
row.names = sapply(x, function(z) z$source),
174-
...)
174+
}
175+
)
176+
),
177+
row.names = sapply(x, function(z) z$source),
178+
...
179+
)
175180
}
176181

177182
print.covidcast_epidata <- function(x, ...) {

0 commit comments

Comments
 (0)