Skip to content

Commit

Permalink
fixes tidyselect deprecation warning
Browse files Browse the repository at this point in the history
  • Loading branch information
l-gorman committed Aug 8, 2023
1 parent d6cec75 commit beea77e
Show file tree
Hide file tree
Showing 4 changed files with 25 additions and 25 deletions.
6 changes: 3 additions & 3 deletions R/CleanRawData.R
Original file line number Diff line number Diff line change
Expand Up @@ -210,7 +210,7 @@ replace_crop_and_livestock_other <- function(data) {
other_3 <- data[["crops_other3"]]
}
data[crop_name_columns] <- data %>%
dplyr::select(crop_name_columns) %>%
dplyr::select(all_of(crop_name_columns)) %>%
dplyr::mutate_all(replace_name_column_with_other, other_1, other_2, other_3)


Expand All @@ -236,7 +236,7 @@ replace_crop_and_livestock_other <- function(data) {
other_3 <- data[["livestock_other3"]]
}
data[livestock_name_columns] <- data %>%
dplyr::select(livestock_name_columns) %>%
dplyr::select(all_of(livestock_name_columns)) %>%
dplyr::mutate_all(replace_name_column_with_other, other_1, other_2, other_3)


Expand Down Expand Up @@ -439,7 +439,7 @@ write_list_of_df_to_folder <- function(list_of_df, folder, converted_values=F) {
old_conversion_file,
by = c("survey_value" = "survey_value",
"id_rhomis_dataset"="id_rhomis_dataset")) %>%
dplyr::select("unit_type.x", "id_rhomis_dataset", "survey_value", "conversion.y") %>%
dplyr::select(all_of(c("unit_type.x", "id_rhomis_dataset", "survey_value", "conversion.y"))) %>%
dplyr::rename("conversion" = "conversion.y") %>%
dplyr::rename("unit_type" = "unit_type.x")
}
Expand Down
8 changes: 4 additions & 4 deletions R/RunAll.R
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,7 @@ make_id_columns <- function(data,

# shift column ordering so that id columns are the left-most columns
for (i in c("id_proj", "id_form", "id_rhomis_dataset", "id_hh", "id_unique")) {
data <- data %>% dplyr::relocate(i)
data <- data %>% dplyr::relocate(all_of(i))
}
return(data)
}
Expand Down Expand Up @@ -169,13 +169,13 @@ load_rhomis_csv <- function(file_path,


# read in the input csv file
rhomis_data <- readr::read_csv(file_path, col_types = readr::cols(),
na = c("na","n/a", "-999", "-99", "NA"),
rhomis_data <- readr::read_csv(file_path, col_types = readr::cols(),
na = c("na","n/a", "-999", "-99", "NA"),
locale = readr::locale(encoding = "UTF8"),
show_col_types=F)

# simplify column names to more readable format
newcolnames <- tolower(clean_column_names(colnames(rhomis_data)))
newcolnames <- tolower(clean_column_names(colnames(rhomis_data)))
colnames(rhomis_data) <- newcolnames

# ensure all data entries are lower case for consistency / easier data analysis
Expand Down
2 changes: 1 addition & 1 deletion man/household_roster_to_categories.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

34 changes: 17 additions & 17 deletions renv.lock
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"R": {
"Version": "4.2.0",
"Version": "4.3.1",
"Repositories": [
{
"Name": "CRAN",
Expand Down Expand Up @@ -137,10 +137,10 @@
},
"cli": {
"Package": "cli",
"Version": "3.3.0",
"Version": "3.6.1",
"Source": "Repository",
"Repository": "CRAN",
"Hash": "23abf173c2b783dcc43379ab9bba00ee"
"Hash": "89e6d8219950eac806ae0c489052048a"
},
"clipr": {
"Package": "clipr",
Expand Down Expand Up @@ -221,10 +221,10 @@
},
"dplyr": {
"Package": "dplyr",
"Version": "1.0.9",
"Version": "1.1.2",
"Source": "Repository",
"Repository": "CRAN",
"Hash": "f0bda1627a7f5d3f9a0b5add931596ac"
"Hash": "dea6970ff715ca541c387de363ff405e"
},
"ellipsis": {
"Package": "ellipsis",
Expand Down Expand Up @@ -403,10 +403,10 @@
},
"lifecycle": {
"Package": "lifecycle",
"Version": "1.0.1",
"Version": "1.0.3",
"Source": "Repository",
"Repository": "CRAN",
"Hash": "a6b6d352e3ed897373ab19d8395c98d0"
"Hash": "001cecbeac1cff9301bdc3775ee46a86"
},
"lubridate": {
"Package": "lubridate",
Expand Down Expand Up @@ -452,10 +452,10 @@
},
"openssl": {
"Package": "openssl",
"Version": "2.0.2",
"Version": "2.1.0",
"Source": "Repository",
"Repository": "CRAN",
"Hash": "6d3bef2e305f55c705c674653c7d7d3d"
"Hash": "273a6bb4a9844c296a459d2176673270"
},
"optparse": {
"Package": "optparse",
Expand All @@ -466,10 +466,10 @@
},
"pillar": {
"Package": "pillar",
"Version": "1.7.0",
"Version": "1.9.0",
"Source": "Repository",
"Repository": "CRAN",
"Hash": "51dfc97e1b7069e9f7e6f83f3589c22e"
"Hash": "15da5a8412f317beeee6175fbc76f4bb"
},
"pkgbuild": {
"Package": "pkgbuild",
Expand Down Expand Up @@ -683,10 +683,10 @@
},
"tibble": {
"Package": "tibble",
"Version": "3.1.7",
"Version": "3.2.1",
"Source": "Repository",
"Repository": "CRAN",
"Hash": "08415af406e3dd75049afef9552e7355"
"Hash": "a84e2cc86d07289b3b6f5069df7a004c"
},
"tidyr": {
"Package": "tidyr",
Expand All @@ -697,10 +697,10 @@
},
"tidyselect": {
"Package": "tidyselect",
"Version": "1.1.2",
"Version": "1.2.0",
"Source": "Repository",
"Repository": "CRAN",
"Hash": "17f6da8cfd7002760a859915ce7eef8f"
"Hash": "79540e5fcd9e0435af547d885f184fd5"
},
"tinytex": {
"Package": "tinytex",
Expand Down Expand Up @@ -739,10 +739,10 @@
},
"vctrs": {
"Package": "vctrs",
"Version": "0.4.1",
"Version": "0.6.3",
"Source": "Repository",
"Repository": "CRAN",
"Hash": "8b54f22e2a58c4f275479c92ce041a57"
"Hash": "d0ef2856b83dc33ea6e255caf6229ee2"
},
"vroom": {
"Package": "vroom",
Expand Down

0 comments on commit beea77e

Please sign in to comment.