Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
L
leo
Manage
Activity
Members
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Locked files
Deploy
Releases
Package registry
Model registry
Operate
Terraform modules
Analyze
Contributor analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Dutz, Gregor
leo
Commits
8a94d39d
Commit
8a94d39d
authored
3 years ago
by
gdutz
Browse files
Options
Downloads
Patches
Plain Diff
Fix rename in list gen
parent
12de42f7
No related branches found
No related tags found
No related merge requests found
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
DESCRIPTION
+1
-1
1 addition, 1 deletion
DESCRIPTION
R/leo_svydesign.R
+2
-2
2 additions, 2 deletions
R/leo_svydesign.R
with
3 additions
and
3 deletions
DESCRIPTION
+
1
−
1
View file @
8a94d39d
Package: leo
Package: leo
Type: Package
Type: Package
Title: Useful functions for LEO surveys
Title: Useful functions for LEO surveys
Version: 0.2.
2
Version: 0.2.
3
Author: Gregor Dutz
Author: Gregor Dutz
Maintainer: Gregor Dutz <gregor.dutz@uni-hamburg.de>
Maintainer: Gregor Dutz <gregor.dutz@uni-hamburg.de>
Description: Implements simple functions to handle data from two German surveys
Description: Implements simple functions to handle data from two German surveys
...
...
This diff is collapsed.
Click to expand it.
R/leo_svydesign.R
+
2
−
2
View file @
8a94d39d
...
@@ -37,8 +37,8 @@ leo_svydesign <- function(df, survey = "leo2018", replist = FALSE) {
...
@@ -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)
# create list with one pv-variable and one level-variable each (and all other variables)
repList
<-
lit
%>%
repList
<-
lit
%>%
purrr
::
map
(
function
(
x
)
{
dplyr
::
select
(
df
,
all
,
paste0
(
"alpha_"
,
x
),
x
)
%>%
purrr
::
map
(
function
(
x
)
{
dplyr
::
select
(
df
,
all
,
paste0
(
"alpha_"
,
x
),
x
)
%>%
dplyr
::
rename
(
.data
$
pv
:
=
!!
x
)
%>%
dplyr
::
rename
(
pv
=
!!
x
)
%>%
dplyr
::
rename
(
.data
$
alpha_pv
:
=
!!
paste0
(
"alpha_"
,
x
))})
dplyr
::
rename
(
alpha_pv
=
!!
paste0
(
"alpha_"
,
x
))})
# create further alpha-variables for different analyses
# create further alpha-variables for different analyses
# alpha3 (three levels): low literate (Alpha 1-3), Alpha 4, above Alpha 4
# alpha3 (three levels): low literate (Alpha 1-3), Alpha 4, above Alpha 4
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment