From 8a94d39d38f13adda236043222de4f0f5eba02cf Mon Sep 17 00:00:00 2001
From: gdutz <30431062+gdutz@users.noreply.github.com>
Date: Tue, 24 Aug 2021 11:07:38 +0200
Subject: [PATCH] Fix rename in list gen

---
 DESCRIPTION       | 2 +-
 R/leo_svydesign.R | 4 ++--
 2 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/DESCRIPTION b/DESCRIPTION
index f367e42..5039f90 100644
--- a/DESCRIPTION
+++ b/DESCRIPTION
@@ -1,7 +1,7 @@
 Package: leo
 Type: Package
 Title: Useful functions for LEO surveys
-Version: 0.2.2
+Version: 0.2.3
 Author: Gregor Dutz
 Maintainer: Gregor Dutz <gregor.dutz@uni-hamburg.de>
 Description: Implements simple functions to handle data from two German surveys 
diff --git a/R/leo_svydesign.R b/R/leo_svydesign.R
index 4423fc6..f23a4d0 100644
--- a/R/leo_svydesign.R
+++ b/R/leo_svydesign.R
@@ -37,8 +37,8 @@ leo_svydesign <- function(df, survey = "leo2018", replist = FALSE) {
     # create list with one pv-variable and one level-variable each (and all other variables)
     repList <- lit %>%
       purrr::map(function(x) {dplyr::select(df, all, paste0("alpha_", x), x) %>%
-          dplyr::rename(.data$pv := !!x) %>%
-          dplyr::rename(.data$alpha_pv := !!paste0("alpha_", x))})
+          dplyr::rename(pv = !!x) %>%
+          dplyr::rename(alpha_pv = !!paste0("alpha_", x))})
 
     # create further alpha-variables for different analyses
     # alpha3 (three levels): low literate (Alpha 1-3), Alpha 4, above Alpha 4
-- 
GitLab