Skip to content

Commit

Permalink
change order of country_id and country_text_id for fetchdem
Browse files Browse the repository at this point in the history
  • Loading branch information
eteitelbaum committed Sep 13, 2024
1 parent 3a738ff commit a992948
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions R/fetchdem.R
Original file line number Diff line number Diff line change
Expand Up @@ -107,8 +107,8 @@ fetchdem <- function(indicators = NULL,
if (!is.null(indicators)) {
filtered_data <- filtered_data |>
dplyr::select(.data$country_name,
.data$country_id,
.data$country_text_id,
.data$country_id,
.data$year,
# some indicators from codebook not available in vdem,
# so we use `any_of` to avoid errors
Expand All @@ -121,8 +121,8 @@ fetchdem <- function(indicators = NULL,
} else {
long_data <- filtered_data |>
tidyr::pivot_longer(cols = -c(.data$country_name,
.data$country_id,
.data$country_text_id,
.data$country_id,
.data$year),
names_to = "indicator",
values_to = "value")
Expand Down

0 comments on commit a992948

Please sign in to comment.