class: center, middle, inverse, title-slide .title[ # Introduction to R for Data Analysis ] .subtitle[ ## Data Wrangling - Part 1 ] .author[ ### Johannes Breuer, Stefan Jünger, & Veronika Batzdorfer ] .date[ ### 2022-08-16 ] --- layout: true --- ## Data wrangling <img src="data:image/png;base64,#../img/wrangl.jpg" width="95%" style="display: block; margin: auto;" /> The process of re-**shaping**, re-**formatting**, and re-**arranging** raw data for analysis --- ## Steps of data wrangling Steps when working with tabular data in the social & behavioral sciences (e.g., from surveys) include: - **selecting** a subset of variables - **renaming** variables - **relocating** variables - **filtering** a subset of cases - **recoding** variables/values - **missing values** recoding - **creating/computing** new variables -- <small>The (in)famous **80/20-rule**: 80% wrangling, 20% analysis (of course, this ratio relates to the time required for writing the code, not the computing time).<small> --- ## The `tidyverse` > The `tidyverse` is a coherent system of packages for .highlight[data manipulation, exploration and visualization] that share a common design philosophy ([Rickert, 2017](https://rviews.rstudio.com/2017/06/08/what-is-the-tidyverse/)). <img src="data:image/png;base64,#https://github.com/rstudio/hex-stickers/raw/master/thumbs/tidyverse.png" width="25%" style="display: block; margin: auto;" /> --- ## Benefits of the `tidyverse` Data wrangling can also be done with `base R`. However, the syntax for this is typically (more) verbose and not intuitive and, hence, difficult to learn, remember, and read (plus many `tidyverse` operations are faster than their base `R` equivalents). `Tidyverse` syntax is designed to increase - **human-readability** making it **attractive for `R` novices** as it can facilitate **self-efficacy** (see [Robinson, 2017](http://varianceexplained.org/r/teach-tidyverse/)) - **consistency** (e.g., data frame as first argument and output) - **smarter defaults** (e.g., no partial matching of data frame and column names). --- ## The 'dark side' of the `tidyverse` `tidyverse` is not `R` as in `base R` - some routines are like using a whole different language, which... - ... can be nice when learning `R` - ... can get difficult when searching for solutions to certain problems - Often, `tidyverse` functions are under heavy development - they change and can potentially break your code - E.g.: [Converting tables into long or wide format](https://tidyr.tidyverse.org/news/index.html#pivoting)<small> To learn more about the `tidyverse` lifecycle you can watch this [talk by Hadley Wickham](https://www.youtube.com/watch?v=izFssYRsLZs) or read the corresponding [documentation](https://lifecycle.r-lib.org/articles/stages.html#deprecated) --- ## `Base R` vs. `tidyverse` Similar to other fierce academic debates over, e.g., `R` vs. `Python` or Frequentism vs. Bayesianism, people have argued [for](http://varianceexplained.org/r/teach-tidyverse/) and [against](https://blog.ephorie.de/why-i-dont-use-the-tidyverse) using/teaching the `tidyverse`. But what's unites both: <img src="https://miro.medium.com/max/1280/0*ifjhcLyODu0nXjVx.jpg" width="60%" style="display: block; margin: auto;" /> .center[ <small><small>Source: https://bit.ly/3PmcL4t</small></small> ] --- ## Data wrangling alternatives As with almost all tasks in `R`, there are more than two packages for data wrangling. Two alternatives (or additions) to `base R` and the `tidyverse` are: - [`data.table`](https://rdatatable.gitlab.io/data.table/index.html) - [`datawizard`](https://easystats.github.io/datawizard/) --- ## `data.table` The `data.table` package also is a powerful tool for data wrangling, especially if you work with large data sets. The reason we do not discuss `data.table` in this course is that neither of us has extensive experience with it, and comparing all three options (`base R`, `tidyverse`, and `data.table`) side-by-side would be enough for a separate workshop/course. There is, however, a very detailed [blog post by Jason Mercer](https://wetlandscapes.com/blog/a-comparison-of-r-dialects/) that compares the functionalities of `base R`, `tidyverse`, and `data.table` for data wrangling and [another one by Atreba](https://atrebas.github.io/post/2019-03-03-datatable-dplyr/) that focuses on a comparison between `data.table` and [`dplyr`](https://dplyr.tidyverse.org/) which is a key package for data manipulation from the `tidyverse`. --- # `datawizard` 🧙 `datawizard` is a fairly new contender in the data wrangling game that also offers quite a few handy and easy to use functions. `datawizard` is part of the [`easystats` collection of `R` packages](https://easystats.github.io/easystats/) which offer many helpful functionalities for data preparation, analysis, and reporting, which can nicely extend or complement the `tidyverse`. We will discuss some of the `easystats` packages again in the sessions on exploratory and confirmatory data analysis. --- ## Structure & focus of this session - focus on differences between `base R` and the `tidyverse` - our main focus will be on the use of packages (and functions) from the `tidyverse` and how they can be used to clean and transform your data. Of course, it is possible to combine `base R` and `tidyverse` code. However, in the long run, you should try to aim for consistency. --- ## Lift-off into the `tidyverse` 🚀 **Install all `tidyverse` packages** (for the full list of `tidyverse` packages see [https://www.tidyverse.org/packages/](https://www.tidyverse.org/packages/)) ```r install.packages("tidyverse") ``` **Load core `tidyverse` packages** (NB: To save time and reduce namespace conflicts you can also load `tidyverse` packages individually) ```r library("tidyverse") ##load the tidyverse package ``` --- ## `tidyverse` vocabulary 101 While there is much more to the `tidyverse` than this, three important concepts that you need to be familiar with, if you want to use it, are: 1. Tidy data 2. Tibbles 3. Pipes <small>(We already discussed tibbles in the session on *Data Import & Export*, so we will focus on tidy data and pipes here.)<small> --- ## Tidy data 🤠 The 3 rules of tidy data: 1. Each **variable** is in a separate **column**. 2. Each **observation** is in a separate **row**. 3. Each **value** is in a separate **cell**. <img src="data:image/png;base64,#https://d33wubrfki0l68.cloudfront.net/6f1ddb544fc5c69a2478e444ab8112fb0eea23f8/91adc/images/tidy-1.png" style="display: block; margin: auto;" /> <small><small>Source: https://r4ds.had.co.nz/tidy-data.html</small></small> *Note*: In the `tidyverse` terminology 'tidy data' usually also means data in long format (where applicable). --- ## Wide vs. long format <img src="data:image/png;base64,#https://raw.githubusercontent.com/gadenbuie/tidyexplain/main/images/static/png/original-dfs-tidy.png" width="45%" style="display: block; margin: auto;" /> <small><small>Source: https://github.com/gadenbuie/tidyexplain#tidy-data</small></small> .small[ *Note*: The functions `pivot_wider()` and `pivot_longer()` from the [`tidyr` package](https://tidyr.tidyverse.org/) are easy-to-use options from changing data from long to wide format and vice versa. ] --- ## Pipes (%>% == and then) Usually, in `R` we apply functions as follows: ```r f(x) ``` In the logic of pipes this function is written as: ```r x %>% f(.) ``` Here, object `x` is piped into function `f`, becoming (by default) its first argument (but by using *.* it can also be fed into other arguments). -- We can use pipes with more than one function: ```r x %>% f_1() %>% f_2() %>% f_3() ``` .small[ More about pipes: https://r4ds.had.co.nz/pipes.html ] --- ## Pipes - The `%>%` used in the `tidyverse` is part of the [`magrittr` package](https://magrittr.tidyverse.org/) which also includes other specialized types of pipes. - *RStudio* offers a keyboard shortcut for inserting **`%>%`**: <kbd>Ctrl + Shift + M</kbd> (*Windows* & *Linux*)/<kbd>Cmd + Shift + M</kbd> (*Mac*) - Since [version 4.1.0](https://cran.r-project.org/bin/windows/base/NEWS.R-4.1.0.html), `base R` also offers its own pipe `|>`, which is similar to but not the same as the `%>%` pipe. --- ## Data set For the examples and exercises in this session we will, again, use data from the [*German General Social Survey (ALLBUS) 2021*](https://search.gesis.org/research_data/ZA5280). .highlight[Remember]: to code along/ for the exercises the *ALLBUS* data file should be in a sub-folder called `data` in the same folder, as the other materials for this course. --- ## Note: Tidy vs. untidy data The *GESIS German General Social Survey (ALLBUS) 2021* is already tidy. If you collect data yourself, the raw data may be `untidy`, e.g.: - cells may hold more than one value - a variable that should be in one column is spread across multiple columns (e.g., parts of a date or name). If you need to make your data tidy or change it from wide to long format or vice versa (which may, e.g., be necessary if you work with longitudinal survey data from multiple waves), the [`tidyr` package](https://tidyr.tidyverse.org/) from the `tidyverse` is a good option. --- ## Interlude 1: Citing data If you (re-)use existing data sets, please cite them in your publications, theses, teaching materials, etc. Data repositories normally provide information on how to cite the data. For example, the APA-style citation for *Public Use File (PUF) of the German General Social Survey (ALLBUS) 2021* is: GESIS - Leibniz-Institut für Sozialwissenschaften (2022). ALLBUS/GGSS 2021 (Allgemeine Bevölkerungsumfrage der Sozialwissenschaften/ German General Social Survey 2021). *GESIS, Cologne. ZA5280 Data file Version 1.0.0, https://doi.org/10.4232/1.13954*. --- ## Interlude 2: Citing FOSS You should also make sure to cite the free and open-source software that you use, such as `R` packages and `R` itself. There is a function in `R` that tells you how to cite it or any of the packages you have used (for this please see `sessionInfo()`). ```r citation() ``` ``` ## ## To cite R in publications use: ## ## R Core Team (2021). R: A language and environment for statistical computing. R Foundation for ## Statistical Computing, Vienna, Austria. URL https://www.R-project.org/. ## ## Ein BibTeX-Eintrag für LaTeX-Benutzer ist ## ## @Manual{, ## title = {R: A Language and Environment for Statistical Computing}, ## author = {{R Core Team}}, ## organization = {R Foundation for Statistical Computing}, ## address = {Vienna, Austria}, ## year = {2021}, ## url = {https://www.R-project.org/}, ## } ## ## We have invested a lot of time and effort in creating R, please cite it when using it for data ## analysis. See also 'citation("pkgname")' for citing R packages. ``` --- ## Interlude 3: Codebook It is always advisable to consult the codebook (if there is one) before starting to work with a data set. We created for the *GESIS German General Social Survey (ALLBUS) 2021* an [English codebook](https://github.com/StefanJuenger/r-intro-gesis-2022/blob/main/data/codebook_gesis_allbus_2021.pdf). Side note: If you want to (semi-)automatically generate a codebook for your own dataset, there are several options in `R`: - the [`codebook` package](https://rubenarslan.github.io/codebook/) which includes an *RStudio*-Addin and also offers a [web app](https://rubenarslan.ocpu.io/codebook/www/) - the `makeCodebook()` function from the [`dataReporter` package](https://github.com/ekstroem/dataReporter) (see this [blog post](http://sandsynligvis.dk/articles/18/codebook.html) for a short tutorial of the initial `dataMaid package`) --- ## Load the data The first step is loading the data into `R`. ```r library(haven) #to load foreign data formats such as from SPSS into R library(sjlabelled) allbus_2021 <- read_sav("./data/allbus_2021ZA5280_v1-0-0.sav", user_na = TRUE) %>% remove_all_labels() %>% as_tibble() ``` --- ## `dplyr` The `tidyverse` examples in the following will make use of [`dplyr` functions](https://dplyr.tidyverse.org/) that are **verbs** that signal an action (e.g. `group_by()`, `glimpse()`, `filter()`) Their structure is: 1. The first argument is a data frame. 2. The subsequent arguments describe what to do with the data frame. 3. The result is a new data frame (tibble). - **columns** (= variables in a tidy data frame) can be referenced without quotation marks (non-standard evaluation) - **actions** (verbs) can be applied to columns (variables) and rows (cases/observations) --- ## First look 👀 The `dplyr` package provides a function for getting a first good look at your data, that is especially helpful when working with data sets that contain many columns/variables. The function `glimpse()` prints a data frame/tibble in a way that represents columns as rows and rows as columns and also provides some additional information about the data frame and its columns. ```r allbus_2021 %>% glimpse() ``` .right[↪️] --- class: middle .tinyisher[ ``` ## Rows: 5,342 ## Columns: 542 ## $ za_nr <dbl> 5280, 5280, 5280, 5280, 5280, 5280, 5280, 5280, 5280, 5280, 5280, 5280, 5280, 5280, 5280,~ ## $ doi <chr> "doi:10.4232/1.13954", "doi:10.4232/1.13954", "doi:10.4232/1.13954", "doi:10.4232/1.13954~ ## $ version <chr> "1.0.0 (2022-07-13)", "1.0.0 (2022-07-13)", "1.0.0 (2022-07-13)", "1.0.0 (2022-07-13)", "~ ## $ respid <dbl> 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25~ ## $ substudy <dbl> 1, 1, 1, 1, 1, 1, 2, 1, 2, 1, 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 2, 1, 2, 1, 1, 2, 1, 2, 1,~ ## $ mode <dbl> 4, 4, 4, 4, 4, 3, 3, 4, 3, 4, 3, 4, 4, 4, 4, 4, 4, 4, 4, 3, 3, 3, 4, 3, 4, 4, 3, 4, 3, 4,~ ## $ splt21 <dbl> 2, 1, 1, 2, 2, 2, 3, 2, 3, 2, 2, 1, 2, 2, 2, 3, 1, 3, 3, 3, 1, 2, 1, 3, 1, 2, 1, 2, 3, 2,~ ## $ eastwest <dbl> 1, 1, 1, 2, 1, 1, 1, 1, 2, 1, 1, 2, 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 2, 2, 1, 2, 1, 2, 2,~ ## $ german <dbl> 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 3, 1, 1, 3, 3, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 1, 1, 1, 1,~ ## $ ep01 <dbl> 3, 3, 3, 2, 3, 2, -11, 3, -11, 3, 2, 2, 3, 2, 3, -11, 2, -11, -11, -11, 3, 2, 3, -11, 4, ~ ## $ ep03 <dbl> 3, 1, 1, 1, 3, 1, -11, 2, -11, 2, 4, 2, 3, 3, 3, -11, 3, -11, -11, -11, 2, 1, 3, -11, 3, ~ ## $ ep04 <dbl> 3, 3, 2, 1, 3, 2, -11, 4, -11, 3, 3, 3, 3, 2, 3, -11, 3, -11, -11, -11, 4, 2, 4, -11, 4, ~ ## $ ep06 <dbl> 4, 3, 3, 1, -8, 3, -11, 4, -11, 3, 3, 3, 3, 1, 2, -11, 3, -11, -11, -11, 3, 3, 3, -11, 4,~ ## $ lm01 <dbl> 2.0, 5.0, 6.0, 7.0, 7.0, 5.0, 3.0, 7.0, 7.0, 7.0, 3.0, 7.0, 6.0, -9.0, 2.0, 0.5, 7.0, 6.0~ ## $ lm02 <dbl> 210, 90, 135, 60, 180, 45, 30, -9, 180, 180, 120, 450, -9, 10, 120, -9, 240, 210, 90, 90,~ ## $ lm19 <dbl> 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 1, 1, 1, 1, 1, 1, 1, 1, 2, 1, 1, 1, 1, 2,~ ## $ lm20 <dbl> 2.0, 5.0, 5.0, 7.0, 7.0, 3.0, 3.0, 7.0, 7.0, 7.0, 3.0, 7.0, 5.0, 0.5, 0.5, -10.0, 7.0, 5.~ ## $ lm21 <dbl> 1, 2, 2, 2, 1, 2, 2, 1, 2, 2, 2, 1, 1, 2, 2, 1, 1, 1, 1, 2, 1, 2, 1, 2, 1, 2, 1, 1, 1, 1,~ ## $ lm22 <dbl> 0.5, -10.0, -10.0, -10.0, 3.0, -10.0, -10.0, 2.0, -10.0, -10.0, -10.0, 7.0, 1.0, -10.0, -~ ## $ lm14 <dbl> 1.0, 0.5, 6.0, 6.0, 0.5, 7.0, 0.5, 0.0, 0.0, 0.5, 0.5, 7.0, 2.0, 0.0, 1.0, 0.0, 0.5, 1.0,~ ## $ xr19 <dbl> 1, 1, 1, 2, 1, -15, -15, 1, -15, 1, -15, 1, 1, 1, 1, 1, 1, 1, 1, -15, -15, -15, 1, -15, 1~ ## $ xr20 <dbl> 1, 1, 3, -10, 2, 1, 1, 1, 2, 1, 1, 3, 1, 1, 1, 2, 1, 1, 1, 1, 3, 1, 1, 1, 1, 1, 1, 1, 1, ~ ## $ lm27 <dbl> 1, 1, 0, -10, 0, 1, 1, 1, 1, 0,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, 2, 2, 1, 1, 1, 2, 2, 2, 2, 2, 1, 1, 2, 2, 2, 2, 2, 1, 1, 2, 2, 1, 1, 2, 2, 2, 2,~ ## $ mi10 <dbl> 1, 2, 2, 2, 2, 1, 1, 2, 3, 2, 2, 3, 2, 1, 1, 2, 2, 2, 2, 2, 2, 2, 2, 2, 3, 1, 2, 2, 2, 2,~ ## $ mi11 <dbl> 1, 2, 2, 2, 2, 1, 1, 2, 2, 2, 1, -9, 1, 1, 1, 3, 1, 2, 1, 2, 2, 1, 2, 1, 2, 1, 1, 2, 3, 2~ ## $ sex <dbl> 2, 1, 2, 1, 2, 1, 2, 2, 1, 2, 1, 1, 2, 1, 1, 2, 1, 1, 1, 1, 2, 1, 2, 2, 1, 1, 1, 2, 1, 2,~ ## $ mborn <dbl> 10, 3, 9, 11, 2, 5, 12, 12, 6, 11, 10, 5, -9, 11, 1, 5, 5, 4, 12, 6, 12, 3, 4, 3, 9, 4, 1~ ## $ yborn <dbl> 1966, 1968, 1931, 1941, 1959, 1998, 1989, 1963, 1953, 1969, 1963, 1936, 1966, 1994, 1983,~ ## $ age <dbl> 54, 53, 89, 79, 62, 23, 31, 57, 68, 51, 57, 85, 55, 26, 38, 58, 54, 45, 49, 26, 83, 48, 4~ ## $ agec <dbl> 3, 3, 5, 5, 4, 1, 2, 3, 4, 3, 3, 5, 3, 1, 2, 3, 3, 3, 3, 1, 5, 3, 3, 4, 4, 1, 3, 3, 3, 4,~ ## $ dn07 <dbl> 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, -9, 1, -9, 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 1, 1, 1, 1, ~ ## $ dm02 <dbl> -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, 2019, -10, -10, -10, 2009, -10, -10, -1~ ## $ dm02c <dbl> -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, 8, -10, -10, -10, 7, -10, -10, -10, -10~ ## $ dm03 <dbl> -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, 2, -10, -10, -10, 12, -10, -10, -10, -1~ ## $ dg10 <dbl> 1, 8, 7, 17, 8, 2, 8, 12, 17, 7, 95, 17, 15, 95, 95, 8, 9, 7, 11, 6, 1, 2, 17, 17, 12, 1,~ ## $ dg03 <dbl> 4, 4, 4, 1, 4, 4, 4, 2, 1, 4, -32, 1, 1, -32, -32, 4, 4, 4, 4, 4, 4, 4, 1, 1, 1, 4, 3, 2,~ ## $ dm06 <dbl> -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, 200, -10, -10, 151, 163, -10, -10, -10,~ ## $ dn01 <dbl> 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 200, 0, 0, 151, 163, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,~ ## $ dn02 <dbl> -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10,~ ## $ dn04 <dbl> 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 1, 1, 1, 1,~ ## $ dn05 <dbl> 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, -10, 1, 1, -10, -10, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 2, 1, 1,~ ## $ ma01b <dbl> -11, 4, 2, -11, -11, -11, 2, -11, 6, -11, -11, 7, -11, -11, -11, 5, 5, 5, 5, 5, 7, -11, -~ ## $ ma02 <dbl> -11, 2, 6, -11, -11, -11, 2, -11, 4, -11, -11, 4, -11, -11, -11, 4, 1, 1, 1, 1, 3, -11, -~ ## $ ma03 <dbl> -11, 1, 7, -11, -11, -11, 1, -11, 3, -11, -11, 4, -11, -11, -11, 4, 3, 1, 1, 1, 2, -11, -~ ## $ ma04 <dbl> -11, 1, 1, -11, -11, -11, 1, -11, 2, -11, -11, 1, -11, -11, -11, 2, 1, 1, 1, 1, 1, -11, -~ ## $ mc01 <dbl> -11, 2, 2, -11, -11, -11, 1, -11, 2, -11, -11, 2, -11, -11, -11, 1, 2, 2, 1, 2, 2, -11, -~ ## $ mc02 <dbl> -11, 1, -9, -11, -11, -11, 1, -11, 2, -11, -11, 2, -11, -11, -11, 1, 1, 1, 1, 1, 2, -11, ~ ## $ mc03 <dbl> -11, 2, 2, -11, -11, -11, 1, -11, 2, -11, -11, 2, -11, -11, -11, 1, 1, 1, 1, 1, 1, -11, -~ ## $ mc04 <dbl> -11, 1, 2, -11, -11, -11, 1, -11, 2, -11, -11, -9, -11, -11, -11, 1, 1, 1, 1, 1, 1, -11, ~ ## $ pn11 <dbl> -11, 3, 2, -11, -11, -11, 3, -11, 2, -11, -11, 1, -11, -11, -11, 3, 3, 4, 2, 2, 2, -11, 3~ ## $ fr07 <dbl> 2, -11, -11, 1, 2, 3, 1, 1, 1, 4, 3, -11, 2, 4, 2, 2, -11, 1, 3, 2, -11, 4, -11, 1, -11, ~ ## $ fr08 <dbl> 3, -11, -11, 2, 1, 2, 2, 1, 2, 4, 1, -11, 2, 4, 1, 4, -11, 2, 3, 3, -11, 3, -11, 1, -11, ~ ## $ fr03b <dbl> 2, -11, -11, 3, 2, 3, 4, 3, 4, 3, 2, -11, 3, 1, 3, 2, -11, 4, 3, 3, -11, 3, -11, 4, -11, ~ ## $ fr04b <dbl> 3, -11, -11, -8, 3, 4, 4, 4, 2, 3, 2, -11, 3, 1, 4, 3, -11, 4, 3, 3, -11, 3, -11, 4, -11,~ ## $ fr05b <dbl> 2, -11, -11, 1, 2, 3, 2, 2, 2, 1, 4, -11, 2, 4, 1, 2, -11, 2, 2, 2, -11, 3, -11, 1, -11, ~ ## $ fr09 <dbl> 3, -11, -11, 3, 3, 2, 2, 2, 3, 3, 2, -11, 3, 4, 3, 3, -11, 4, 2, 2, -11, 2, -11, 4, -11, ~ ## $ fr10 <dbl> 4, -11, -11, 4, 4, 3, 4, 4, 4, 4, 2, -11, 3, 4, 4, 4, -11, 4, 4, 2, -11, 3, -11, 4, -11, ~ ## $ fr11 <dbl> 2, -11, -11, 1, 1, 2, 3, 2, 1, 4, 2, -11, 2, 1, 2, 2, -11, 2, 1, 3, -11, 4, -11, 1, -11, ~ ## $ fr12 <dbl> 1, -11, -11, 1, 2, 1, 1, 1, 1, 1, 3, -11, 2, 4, 1, 1, -11, 1, 1, 3, -11, 1, -11, 1, -11, ~ ## $ fe13 <dbl> 5, -11, -11, 3, 4, 4, 4, 4, -9, 5, 2, -11, 2, 1, 5, 4, -11, 5, 3, 4, -11, -8, -11, 5, -11~ ## $ fe14 <dbl> 3, -11, -11, 5, 3, 5, 5, 3, -9, 3, 5, -11, 5, 5, 4, 5, -11, 4, 4, 5, -11, -8, -11, 4, -11~ ## $ fe15 <dbl> 1, -11, -11, 2, 1, 1, 1, 2, 1, 1, 4, -11, 1, 4, 1, 1, -11, 1, 1, 1, -11, 1, -11, 1, -11, ~ ## $ fe16 <dbl> 4, -11, -11, 4, 5, 2, 3, 5, -9, 4, 1, -11, 4, 2, 3, 3, -11, 3, 5, 3, -11, -8, -11, 3, -11~ ## $ fe17 <dbl> 2, -11, -11, 1, 2, 3, 2, 1, -9, 2, 3, -11, 3, 3, 2, 2, -11, 2, 2, 2, -11, 2, -11, 2, -11,~ ## $ ja01 <dbl> 7, -11, -11, 7, 7, 5, 5, 7, 7, -9, 4, -11, 6, 5, 7, 6, -11, 5, 7, 7, -11, 3, -11, 7, -11,~ ## $ ja02 <dbl> 5, -11, -11, 5, 4, 7, 5, 5, 5, 2, 5, -11, 7, 5, 6, 4, -11, 5, 6, 3, -11, 4, -11, 3, -11, ~ ## $ ja03 <dbl> 3, -11, -11, 5, 5, 7, 6, 6, 5, 2, 5, -11, 5, 6, 6, 5, -11, 5, 6, 5, -11, 2, -11, 1, -11, ~ ## $ ja04 <dbl> 2, -11, -11, 7, 5, 7, 6, 4, 6, 3, 7, -11, 4, 5, 7, 7, -11, 5, 6, 4, -11, 5, -11, 5, -11, ~ ## $ ja05 <dbl> 6, -11, -11, 3, 5, 5, 5, 5, 3, 7, 5, -11, 5, 5, 7, 4, -11, 5, 7, 6, -11, 4, -11, 4, -11, ~ ## $ ja06 <dbl> 6, -11, -11, 6, 6, 6, 7, 6, 6, 7, 4, -11, 6, 7, 7, 6, -11, 5, 7, 7, -11, 7, -11, 5, -11, ~ ## $ ja07 <dbl> 5, -11, -11, 2, 6, 5, 4, 7, 7, 6, 4, -11, 6, 7, 7, 6, -11, 4, 7, 6, -11, 6, -11, 7, -11, ~ ## $ ja08 <dbl> 2, -11, -11, 6, 4, 6, 5, 5, 7, 4, 4, -11, 6, 6, 6, 5, -11, 5, 6, 5, -11, 6, -11, 7, -11, ~ ## $ ja09 <dbl> 5, -11, -11, 5, 5, 5, 4, 5, 6, 2, 4, -11, 6, 6, 5, 3, -11, 5, 3, 5, -11, 6, -11, 7, -11, ~ ## $ ja10 <dbl> 5, -11, -11, 5, 4, 2, 5, 5, 5, 7, 6, -11, 6, 6, 6, 4, -11, 5, 4, 5, -11, 4, -11, 5, -11, ~ ## $ ja11 <dbl> 5, -11, -11, 7, 3, 4, 4, 5, 6, 6, 7, -11, 6, 6, 7, 4, -11, 6, 4, 6, -11, 5, -11, 7, -11, ~ ## $ lp03 <dbl> 1, 2, 2, 1, 1, 1, 2, 1, 1, 1, -8, 2, 2, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 1, 1, -8, 1, ~ ## $ lp04 <dbl> 2, 2, 1, -8, -8, 2, 2, 2, 1, 2, 1, 2, 2, 2, 1, 2, 1, 1, 2, 2, 2, 2, 1, 2, 2, 2, 1, -8, 1,~ ## $ lp05 <dbl> 1, 2, 1, 1, 1, 2, 1, 1, 1, 1, -8, 2, 1, 2, 1, 1, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 1, 1, 1~ ## $ lp06 <dbl> 1, 2, 1, 1, 1, 1, 1, 1, 1, 1, 2, 1, 2, 1, 1, 1, 1, 2, 1, 2, 1, 2, 1, 1, 1, 1, 1, 1, 1, 2,~ ## $ vm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dbl> 7, 7, 4, 4, 5, 7, -11, 3, -11, 6, 7, 7, 6, 6, 6, -11, 6, -11, -11, -11, 7, 6, 4, -11, 2, ~ ## $ pt03 <dbl> 4, 4, 5, 3, 4, 5, -11, 3, -11, 2, 7, 6, 4, 6, 5, -11, 5, -11, -11, -11, 3, 6, 4, -11, 1, ~ ## $ pt04 <dbl> 2, 4, 6, 4, 5, 3, -11, 3, -11, -9, 5, 5, 5, 6, 5, -11, 6, -11, -11, -11, 4, 5, 4, -11, 5,~ ## $ pt06 <dbl> 3, 2, 1, 1, 3, 2, -11, 1, -11, 1, 5, 1, 3, 1, 1, -11, 2, -11, -11, -11, 1, 2, 2, -11, 3, ~ ## $ pt07 <dbl> 7, 5, 3, 2, 5, 2, -11, 2, -11, 3, 5, 1, 3, 1, 1, -11, 3, -11, -11, -11, 1, 5, 2, -11, 3, ~ ## $ pt08 <dbl> 4, 5, 6, 5, 4, 5, -11, 3, -11, 3, 7, 5, 6, 6, 5, -11, 5, -11, -11, -11, 6, 6, 4, -11, 2, ~ ## $ pt09 <dbl> 2, 5, 4, 4, 5, 3, -11, 3, -11, 4, 3, 5, 5, 2, 2, -11, 4, -11, -11, -11, 4, 4, 3, -11, 2, ~ ## $ pt10 <dbl> 4, 5, 4, -9, 6, 4, -11, 3, -11, 4, 3, 5, 5, 2, 3, -11, 4, -11, -11, -11, 5, 7, 3, -11, 2,~ ## $ pt11 <dbl> 7, 5, 4, 5, 6, 5, -11, 4, -11, 6, 6, 6, 6, 2, 6, -11, 5, -11, -11, -11, 5, 7, 5, -11, 3, ~ ## $ pt12 <dbl> 6, 6, 5, 3, 4, 5, -11, 4, -11, 2, 5, 6, 5, 5, 4, -11, 3, -11, -11, -11, 3, 6, 3, -11, 1, ~ ## $ pt14 <dbl> 3, 5, 6, 2, 5, 6, -11, 4, -11, 4, 6, 5, 6, 6, 2, -11, 5, -11, -11, -11, 6, 5, 4, -11, 4, ~ ## $ pt15 <dbl> 3, 4, 4, 2, 3, 3, -11,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, 4, 3, 3, 3, 3, 3, 4, 3~ ## $ iw04 <dbl> 1, 4, 2, 2, 2, 2, 2, 2, 2, 1, 2, 1, 2, 3, 1, 2, 1, 2, 1, 1, 2, 1, 2, 1, 1, 1, 2, 2, 1, 2,~ ## $ pd11 <dbl> 2, 1, 2, 1, 1, 1, 2, 2, 2, 1, 1, 2, 2, 1, 2, 2, 2, 1, 2, 1, 1, 2, 2, 1, 3, 2, 2, 2, 2, 3,~ ## $ pi07 <dbl> 2, -11, -11, 2, 1, 1, 2, 1, 2, 1, -8, -11, 1, 1, 2, 1, -11, -9, 2, 1, -11, 2, -11, 2, -11~ ## $ pi01 <dbl> 1, 1, 2, 1, 1, 2, 1, 1, 1, 1, 2, 1, 1, 1, 1, 1, 1, 1, 1, 2, 1, 1, 1, 1, 1, 1, 1, 1, 2, 2,~ ## $ pi02 <dbl> 3, 2, -10, 3, 3, -10, 2, 2, 2, 2, -10, 2, 2, 2, 3, 1, 3, 2, 3, -10, 1, 3, 2, 2, 1, 3, 3, ~ ## $ pc01 <dbl> 3, 3, 4, 3, -8, 3, -11, 4, -11, 4, -8, 3, 3, 4, 4, -11, 3, -11, -11, -11, 4, 4, 4, -11, 4~ ## $ pc02 <dbl> 3, 2, 2, 3, 2, 3, -11, 3, -11, 4, 2, 3, -9, 2, 3, -11, 4, -11, -11, -11, 3, 3, 3, -11, 2,~ ## $ pc03 <dbl> 4, 2, 3, 4, 3, 2, -11, 4, -11, 4, 2, 3, 2, 2, 3, -11, 4, -11, -11, -11, 3, 3, 2, -11, 2, ~ ## $ pc04 <dbl> 2, 1, 2, 3, 2, 2, -11, 3, -11, 2, 2, 2, 3, 2, 1, -11, 4, -11, -11, -11, 2, 3, 2, -11, 1, ~ ## $ pc05 <dbl> 2, 2, 2, 3, 3, 3, -11, 3, -11, 3, 2, 2, 2, 2, 2, -11, 3, -11, -11, -11, 2, -9, 3, -11, 1,~ ## $ pc06 <dbl> 4, 2, 3, 4, 4, 2, -11, 4, -11, 4, 2, 3, 3, 2, 4, -11, 4, -11, -11, -11, 3, 4, 3, -11, 2, ~ ## $ pc07 <dbl> 2, 2, 2, 3, 2, 2, -11, 2, -11, 3, 2, 2, 2, 2, 3, -11, 3, -11, -11, -11, 2, 3, 3, -11, 2, ~ ## $ pc08 <dbl> 4, 2, 3, 4, 3, 3, -11, 3, -11, 3, 2, -9, 4, 2, 4, -11, 4, -11, -11, -11, 4, 3, 2, -11, 4,~ ## $ pc09 <dbl> 4, 2, 4, 4, 3, 3, -11, 2, -11, 4, 2, 3, 3, -8, 4, -11, 4, -11, -11, -11, 3, 4, 3, -11, 3,~ ## $ pc10 <dbl> 2, 2, 3, 3, 3, 3, -11, 3, -11, -9, -8, 3, 3, -8, 2, -11, 2, -11, -11, -11, 3, 2, 4, -11, ~ ## $ pc11 <dbl> 3, 2, 2, 3, 2, 3, -11, 2, -11, 2, 2, 2, 3, 1, 3, -11, 2, -11, -11, -11, 2, 2, 3, -11, 2, ~ ## $ pc17 <dbl> 2, 2, 3, 3, 2, 2, -11, 2, -11, 2, -8, 2, 3, -8, 3, -11, 2, -11, -11, -11, 2, 2, 2, -11, 2~ ## $ pc19 <dbl> 4, 2, 2, 3, 2, 2, -11, 3, -11, 2, 2, 3, 2, 3, 3, -11, 3, -11, -11, -11, 3, 3, 3, -11, 3, ~ ## $ pc20 <dbl> 2, 2, 2, 3, 3, 1, -11, 3, -11, 3, -8, 3, -8, 3, 2, -11, 3, -11, -11, -11, 4, 2, 4, -11, 3~ ## $ pa02a <dbl> 3, 1, 4, 3, 3, 1, 2, 3, 1, 2, 4, 2, 3, 3, 1, 2, 3, 1, 3, 2, 3, 2, 3, 2, 1, 2, 3, 3, 4, 3,~ ## $ va01 <dbl> 4, 2, 1, 1, 2, 1, -11, 3, -11, 2, 1, 1, 1, 1, 4, -11, 4, -11, -11, -11, 1, 3, 1, -11, 3, ~ ## $ va02 <dbl> 1, 3, 3, 2, 3, 4, -11, 2, -11, 1, 3, 2, 2, 3, 1, -11, 3, -11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05 <dbl> 0, 0, 0, 0, 0, -10, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ~ ## $ de18 <dbl> -10, 7, -10, -10, -10, -10, 6, -10, -10, -10, -10, 3, -10, -10, 1, -10, -10, 5, -10, 2, -~ ## $ de17 <dbl> -10, -10, -10, -10, -10, -10, -10, -10, 2, -10, -10, -10, -10, -10, -10, -10, -10, -10, -~ ## $ isced97 <dbl> 5, 5, 4, 5, 3, -32, 6, 5, 5, 3, 5, 5, 5, 5, 5, 5, 3, 5, 3, 5, 3, 5, 5, 5, 3, 5, 3, 3, 3, ~ ## $ iscd11 <dbl> 5, 6, 4, 5, 3, -32, 8, 5, 7, 3, 5, 7, 5, 5, 6, 5, 3, 7, 3, 7, 3, 7, 7, 5, 3, 7, 3, 3, 3, ~ ## $ work <dbl> 1, 1, 4, 4, 4, 4, 2, 1, 4, 2, 4, 4, 2, 1, 1, 2, 1, 2, 1, 1, 4, 1, 2, 4, 1, 1, 1, 1, 1, 2,~ ## $ dw01 <dbl> 5, 2, -10, -10, -10, -10, 5, 5, -10, 5, -10, -10, 5, 3, 5, 5, 6, 4, 6, 5, -10, 4, 5, -10,~ ## $ dw02 <dbl> 51, 14, -10, -10, -10, -10, 53, 52, -10, 52, -10, -10, 53, 20, 53, 52, 62, 43, 62, 52, -1~ ## $ isco88 <dbl> 4223, 2419, -10, -10, -10, -10, 2149, 2470, -10, 3231, -10, -10, 3320, 7437, 2359, 3231, ~ ## $ siops88 <dbl> 38, 57, -10, -10, -10, -10, 56, 62, -10, 44, -10, -10, 50, 31, 62, 44, 44, 60, 38, 62, -1~ ## $ isei88 <dbl> 52, 69, -10, -10, -10, -10, 69, 70, -10, 38, -10, -10, 38, 28, 65, 38, 30, 69, 34, 69, -1~ ## $ isco08 <dbl> 5244, 2421, -10, -10, -10, -10, 2310, 4110, -10, 3221, -10, -10, 3412, 3432, 2351, 3221, ~ ## $ siops08 <dbl> 26.00, 55.80, -10.00, -10.00, -10.00, -10.00, 78.16, 42.09, -10.00, 44.00, -10.00, -10.00~ ## $ isei08 <dbl> 38.88, 70.09, -10.00, -10.00, -10.00, -10.00, 85.41, 43.33, -10.00, 56.00, -10.00, -10.00~ ## $ eseg <dbl> 71, 23, 80, 80, 99, 91, 25, 51, 83, 32, 63, 81, 34, 42, 25, 32, 63, 25, 63, 23, 83, 25, 3~ ## $ dw07 <dbl> 2, -10, -10, -10, -10, -10, 1, 1, -10, 2, -10, -10, 1, -10, 1, 1, 2, 1, 2, 2, -10, 1, 1, ~ ## $ dw15 <dbl> 35.0, 62.0, -10.0, -10.0, -10.0, -10.0, 32.0, 39.5, -10.0, 30.0, -10.0, -10.0, 33.0, 55.5~ ## $ dw10 <dbl> 2, 2, -10, -10, -10, -10, 1, 2, -10, 2, -10, -10, 2, 2, 1, 1, 1, 2, 1, 1, -10, 1, 2, -10,~ ## $ dw16 <dbl> 1, -10, -10, -10, -10, -10, 2, 1, -10, 1, -10, -10, 1, -10, 1, 1, 3, 1, 1, 1, -10, 1, 1, ~ ## $ dw17 <dbl> -10, 1, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, 1, -10, -10, -10, -10, -10~ ## $ dw18 <dbl> 2, 2, -10, -10, -10, -10, 2, 2, -10, 2, -10, -10, 2, 2, 2, 2, 2, 2, 2, 2, -10, 2, 2, -10,~ ## $ dw19 <dbl> -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10,~ ## $ dw19c <dbl> -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10,~ ## $ dw37 <dbl> -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10,~ ## $ dw03 <dbl> -10, -10, 2, 2, 4, 1, -10, -10, 2, -10, 3, 2, -10, -10, -10, -10, -10, -10, -10, -10, 2, ~ ## $ dw12 <dbl> -10, -10, -50, 1998, 1999, 2020, -10, -10, 2019, -10, 2020, 2001, -10, -10, -10, -10, -10~ ## $ dw12a <dbl> -10, -10, -32, 57, 40, 22, -10, -10, 66, -10, 57, 65, -10, -10, -10, -10, -10, -10, -10, ~ ## $ dw12b <dbl> -10, -10, -32, 23, 22, 1, -10, -10, 2, -10, 1, 20, -10, -10, -10, -10, -10, -10, -10, -10~ ## $ dw01a <dbl> -10, -10, -10, 9, 5, 5, -10, -10, 5, -10, 6, 5, -10, -10, -10, -10, -10, -10, -10, -10, 5~ ## $ dw02a <dbl> -10, -10, -10, 65, 51, 52, -10, -10, 53, -10, 61, 53, -10, -10, -10, -10, -10, -10, -10, ~ ## $ isco88a <dbl> -10, -10, -10, 3213, 4132, 7136, -10, -10, 3119, -10, 7137, 2145, -10, -10, -10, -10, -10~ ## $ siops88a <dbl> -10, -10, -10, 55, 44, 34, -10, -10, 46, -10, 44, 66, -10, -10, -10, -10, -10, -10, -10, ~ ## $ isei88a <dbl> -10, -10, -10, 50, 43, 33, -10, -10, 53, -10, 37, 67, -10, -10, -10, -10, -10, -10, -10, ~ ## $ isco08a <dbl> -10, -10, -10, 6221, 4110, 8219, -10, -10, 3341, -10, 7411, 1321, -10, -10, -10, -10, -10~ ## $ siops08a <dbl> -10.00, -10.00, -10.00, 27.24, 42.09, 39.34, -10.00, -10.00, 48.81, -10.00, 44.01, 64.00,~ ## $ isei08a <dbl> -10.00, -10.00, -10.00, 17.00, 43.33, 24.68, -10.00, -10.00, 62.13, -10.00, 36.35, 65.42,~ ## $ dw20 <dbl> -10, -10, -9, 2, -9, 1, -10, -10, 2, -10, -10, 2, -10, -10, -10, -10, -10, -10, -10, -10,~ ## $ dw22 <dbl> -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, 2, -10, -10, -10, -10, -10, -10, -10, -~ ## $ dw23 <dbl> -10, -10, -10, -10, -10, 2, -10, -10, -10, -10, 26, -10, -10, -10, -10, -10, -10, -10, -1~ ## $ dw23c <dbl> -10, -10, -10, -10, -10, 1, -10, -10, -10, -10, 4, -10, -10, -10, -10, -10, -10, -10, -10~ ## $ hs01 <dbl> 4, 3, 2, 3, 3, 2, 1, 2, 4, 3, 2, 4, 3, 2, 3, 4, 4, 2, 2, 1, 3, 1, 3, 3, 3, 3, 2, 2, 2, 3,~ ## $ hs04 <dbl> 3, -11, -11, 4, 3, 2, 1, 3, 4, 2, 4, -11, 2, 2, 3, 2, -11, 2, 2, 3, -11, 2, -11, 3, -11, ~ ## $ hs05 <dbl> 2, -11, -11, 4, 3, 3, 2, 2, 3, 2, 5, -11, 4, 3, 3, 3, -11, 3, 3, 4, -11, 4, -11, 4, -11, ~ ## $ hs06 <dbl> 3, -11, -11, 5, 2, 3, 3, 4, 3, 4, 2, -11, 3, 3, 4, 3, -11, 2, 3, 2, -11, 3, -11, 2, -11, ~ ## $ hs07 <dbl> 3, -11, -11, 3, 3, 3, 4, 4, 4, 4, 2, -11, 2, 3, 3, 4, -11, 3, 4, 3, -11, 2, -11, 2, -11, ~ ## $ hs08 <dbl> 2, -11, -11, 5, 4, 4, 4, 4, 2, 3, 4, -11, 3, 4, 4, 2, -11, 4, 5, 5, -11, 5, -11, 4, -11, ~ ## $ hs09 <dbl> 5, -11, -11, 5, 4, 3, 3, 4, 4, 5, 2, -11, 4, 2, 3, 4, -11, 4, 2, 3, -11, 5, -11, 5, -11, ~ ## $ lp09 <dbl> 3, 4, 2, 3, 3, 2, 3, 2, 4, 2, 2, 2, 3, 2, 2, 3, 3, 3, 3, 3, 3, 4, 3, 3, 3, 2, 3, 3, 4, 2,~ ## $ lp10 <dbl> 4, 4, 4, 4, 4, 2, 2, 2, 4, 4, 3, 3, 3, 2, 2, 4, 3, 3, 3, 3, 4, 3, 4, 3, 4, 2, 4, 3, 4, 3,~ ## $ lp11 <dbl> 4, 4, 4, 4, 4, 4, 2, 2, 3, 4, 3, 3, 3, 2, 3, 4, 3, 2, 3, 4, 4, 2, 3, 4, 4, 3, 4, 3, 3, 3,~ ## $ lp12 <dbl> 3, 4, 3, 4, 2, 2, 3, 3, 2, 1, 3, 4, 3, 3, 2, 4, 3, 3, 4, 4, 3, 3, 3, 2, 2, 2, 4, 3, 4, 3,~ ## $ rb07 <dbl> 10, -11, -11, 1, 7, 5, 3, 1, 8, 1, 9, -11, 3, 10, 2, 8, -11, 1, 3, 2, -11, 8, -11, 1, -11~ ## $ rd01 <dbl> 1, 1, 1, 1, 3, 3, 6, 6, 1, 1, 1, 6, 6, 4, 6, -7, 3, 6, 6, 1, 3, 3, 6, 6, 6, 6, 1, 6, 6, 6~ ## $ rd02 <dbl> -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, 2, -10, -10, -10, -10, -~ ## $ rd03 <dbl> -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10,~ ## $ rp01 <dbl> 4, 6, 5, 5, 5, 4, 5, 6, 4, 5, 2, 5, 5, 1, 6, 2, 6, 6, 5, 5, 6, 4, 5, 5, 6, 6, 6, 6, 6, 5,~ ## $ rp02 <dbl> -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10,~ ## $ mj01 <dbl> -11, 1, 5, -11, -11, -11, -8, -11, 4, -11, -11, 5, -11, -11, -11, 1, 2, 1, -8, 1, 5, -11,~ ## $ mj02 <dbl> -11, 7, 4, -11, -11, -11, 6, -11, 7, -11, -11, 7, -11, -11, -11, 7, 6, 6, 7, 7, 7, -11, -~ ## $ mj03 <dbl> -11, 3, 6, -11, -11, -11, 2, -11, 1, -11, -11, 4, -11, -11, -11, 2, 6, 1, 5, 5, 6, -11, -~ ## $ mj04 <dbl> -11, 1, -8, -11, -11, -11, 1, -11, 1, -11, -11, 6, -11, -11, -11, 1, 2, 1, 2, 1, 5, -11, ~ ## $ mj05 <dbl> -11, 1, -8, -11, -11, -11, 4, -11, 3, -11, -11, 6, -11, -11, -11, 1, 2, 1, -8, 2, 5, -11,~ ## $ mj06 <dbl> -11, 4, -8, -11, -11, -11, 5, -11, 6, -11, -11, 7, -11, -11, -11, 4, 3, 1, 6, 6, 7, -11, ~ ## $ mm01 <dbl> -11, 1, 2, -11, -11, -11, 1, -11, 5, -11, -11, 5, -11, -11, -11, 4, 2, 5, 1, 1, 6, -11, -~ ## $ mm02 <dbl> -11, 3, 5, -11, -11, -11, 5, -11, 2, -11, -11, 5, -11, -11, -11, 2, 4, 5, 4, 6, 2, -11, -~ ## $ mm03 <dbl> -11, 3, 2, -11, -11, -11, 6, -11, 5, -11, -11, 4, -11, -11, -11, 4, 4, 1, 3, 2, 7, -11, -~ ## $ mm04 <dbl> -11, 1, 6, -11, -11, -11, 3, -11, 5, -11, -11, 5, -11, -11, -11, 5, 4, 2, 2, 1, 4, -11, -~ ## $ mm05 <dbl> -11, 7, 7, -11, -11, -11, 7, -11, 1, -11, -11, 4, -11, -11, -11, 1, 6, 6, 7, 7, 6, -11, -~ ## $ mm06 <dbl> -11, 1, -8, -11, -11, -11, 2, -11, 7, -11, -11, 6, -11, -11, -11, 6, 5, 5, 2, 2, 6, -11, ~ ## $ mstat <dbl> 5, 5, 3, 1, 1, 5, 5, 1, 1, 5, 3, 1, 1, 5, 4, 1, 4, 1, 5, 5, 3, 1, 5, 1, 1, 5, 5, 1, 1, 1,~ ## $ scmborn <dbl> -10, -10, -10, 8, 10, -10, -10, 5, 12, -10, -10, 10, 3, -10, -10, 5, -10, 11, -10, -10, -~ ## $ scyborn <dbl> -10, -10, -10, 1944, 1960, -10, -10, 1959, 1953, -10, -10, 1939, 1960, -10, -10, 1959, -1~ ## $ scage <dbl> -10, -10, -10, 76, 60, -10, -10, 62, 67, -10, -10, 81, 61, -10, -10, 62, -10, 44, -10, -1~ ## $ scagec <dbl> -10, -10, -10, 6, 5, -10, -10, 5, 5, -10, -10, 6, 5, -10, -10, 5, -10, 3, -10, -10, -10, ~ ## $ sceduc <dbl> -10, -10, -10, 2, 2, -10, -10, 3, 4, -10, -10, -9, 3, -10, -10, 3, -10, 5, -10, -10, -10,~ ## $ scde06 <dbl> -10, -10, -10, 1, 1, -10, -10, 0, 0, -10, -10, 0, 0, -10, -10, 0, -10, 0, -10, -10, -10, ~ ## $ scde07 <dbl> -10, -10, -10, 0, 0, -10, -10, 0, 0, -10, -10, 0, 0, -10, -10, 0, -10, 0, -10, -10, -10, ~ ## $ scde08 <dbl> -10, -10, -10, 0, 0, -10, -10, 0, 0, -10, -10, 0, 0, -10, -10, 0, -10, 0, -10, -10, -10, ~ ## $ scde09 <dbl> -10, -10, -10, 0, 0, -10, -10, 1, 0, -10, -10, 0, 0, -10, -10, 0, -10, 0, -10, -10, -10, ~ ## $ scde10 <dbl> -10, -10, -10, 0, 0, -10, -10, 0, 0, -10, -10, 0, 0, -10, -10, 0, -10, 0, -10, -10, -10, ~ ## $ scde12 <dbl> -10, -10, -10, 0, 0, -10, -10, 0, 1, -10, -10, 0, 1, -10, -10, 1, -10, 0, -10, -10, -10, ~ ## $ scde11 <dbl> -10, -10, -10, 0, 0, -10, -10, 0, 0, -10, -10, 0, 0, -10, -10, 0, -10, 0, -10, -10, -10, ~ ## $ scde13 <dbl> -10, -10, -10, 0, 0, -10, -10, 0, 0, -10, -10, 1, 0, -10, -10, 0, -10, 0, -10, -10, -10, ~ ## $ scde14 <dbl> -10, -10, -10, 0, 0, -10, -10, 0, 0, -10, -10, 0, 0, -10, -10, 0, -10, 0, -10, -10, -10, ~ ## $ scde15 <dbl> -10, -10, -10, 0, 0, -10, -10, 0, 0, -10, -10, 0, 0, -10, -10, 0, -10, 1, -10, -10, -10, ~ ## $ scde16 <dbl> -10, -10, -10, 0, 0, -10, -10, 0, 0, -10, -10, 0, 0, -10, -10, 0, -10, 0, -10, -10, -10, ~ ## $ scde05 <dbl> -10, -10, -10, 0, 0, -10, -10, 0, 0, -10, -10, 0, 0, -10, -10, 0, -10, 0, -10, -10, -10, ~ ## $ scde17 <dbl> -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10,~ ## $ scde18 <dbl> -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, 5, -~ ## $ sciscd97 <dbl> -10, -10, -10, 2, 2, -10, -10, 3, 4, -10, -10, 5, 3, -10, -10, 3, -10, 5, -10, -10, -10, ~ ## $ sciscd11 <dbl> -10, -10, -10, 2, 2, -10, -10, 3, 4, -10, -10, 5, 3, -10, -10, 3, -10, 7, -10, -10, -10, ~ ## $ scwork <dbl> -10, -10, -10, 4, 1, -10, -10, 1, 4, -10, -10, 4, 1, -10, -10, 4, -10, 2, -10, -10, -10, ~ ## $ scdw01 <dbl> -10, -10, -10, -10, 6, -10, -10, 6, -10, -10, -10, -10, 6, -10, -10, -10, -10, 4, -10, -1~ ## $ scdw02 <dbl> -10, -10, -10, -10, 61, -10, -10, 62, -10, -10, -10, -10, 62, -10, -10, -10, -10, 43, -10~ ## $ scisco88 <dbl> -10, -10, -10, -10, 8332, -10, -10, 7136, -10, -10, -10, -10, -33, -10, -10, -10, -10, 23~ ## $ scsiop88 <dbl> -10, -10, -10, -10, 32, -10, -10, 34, -10, -10, -10, -10, -32, -10, -10, -10, -10, 60, -1~ ## $ scisei88 <dbl> -10, -10, -10, -10, 26, -10, -10, 33, -10, -10, -10, -10, -32, -10, -10, -10, -10, 69, -1~ ## $ scisco08 <dbl> -10, -10, -10, -10, 8342, -10, -10, 7412, -10, -10, -10, -10, -33, -10, -10, -10, -10, 23~ ## $ scsiop08 <dbl> -10.00, -10.00, -10.00, -10.00, 32.00, -10.00, -10.00, 38.00, -10.00, -10.00, -10.00, -10~ ## $ scisei08 <dbl> -10.00, -10.00, -10.00, -10.00, 24.45, -10.00, -10.00, 36.92, -10.00, -10.00, -10.00, -10~ ## $ sceseg <dbl> -10, -10, -10, 80, 65, -10, -10, 63, 80, -10, -10, 80, 1, -10, -10, 80, -10, 25, -10, -10~ ## $ scdw07 <dbl> -10, -10, -10, -10, 2, -10, -10, -9, -10, -10, -10, -10, 2, -10, -10, -10, -10, 1, -10, -~ ## $ scdw03 <dbl> -10, -10, -10, 2, -10, -10, -10, -10, 2, -10, -10, 2, -10, -10, -10, 2, -10, -10, -10, -1~ ## $ dp01 <dbl> 1, 2, 2, -10, -10, 1, 1, -10, -10, 1, 2, -10, -10, 2, 2, -10, 1, -10, 2, 2, 2, -10, 1, -1~ ## $ dp03 <dbl> 2, -10, -10, -10, -10, 1, 1, -10, -10, 1, -10, -10, -10, -10, -10, -10, 1, -10, -10, -10,~ ## $ pmborn <dbl> 12, -10, -10, -10, -10, 9, 3, -10, -10, 10, -10, -10, -10, -10, -10, -10, 1, -10, -10, -1~ ## $ pyborn <dbl> 1965, -10, -10, -10, -10, 1997, 1987, -10, -10, 1968, -10, -10, -10, -10, -10, -10, 1964,~ ## $ page <dbl> 55, -10, -10, -10, -10, 23, 34, -10, -10, 52, -10, -10, -10, -10, -10, -10, 57, -10, -10,~ ## $ pagec <dbl> 4, -10, -10, -10, -10, 2, 3, -10, -10, 4, -10, -10, -10, -10, -10, -10, 4, -10, -10, -10,~ ## $ peduc <dbl> 5, -10, -10, -10, -10, 5, 5, -10, -10, 3, -10, -10, -10, -10, -10, -10, 2, -10, -10, -10,~ ## $ pde06 <dbl> 0, -10, -10, -10, -10, 0, 0, -10, -10, 0, -10, -10, -10, -10, -10, -10, 0, -10, -10, -10,~ ## $ pde07 <dbl> 0, -10, -10, -10, -10, 0, 0, -10, -10, 0, -10, -10, -10, -10, -10, -10, 0, -10, -10, -10,~ ## $ pde08 <dbl> 1, -10, -10, -10, -10, 0, 0, -10, -10, 1, -10, -10, -10, -10, -10, -10, 1, -10, -10, -10,~ ## $ pde09 <dbl> 1, -10, -10, -10, -10, 0, 0, -10, -10, 0, -10, -10, -10, -10, -10, -10, 0, -10, -10, -10,~ ## $ pde10 <dbl> 0, -10, -10, -10, -10, 0, 0, -10, -10, 0, -10, -10, -10, -10, -10, -10, 0, -10, -10, -10,~ ## $ pde12 <dbl> 0, -10, -10, -10, -10, 0, 0, -10, -10, 0, -10, -10, -10, -10, -10, -10, 0, -10, -10, -10,~ ## $ pde11 <dbl> 0, -10, -10, -10, -10, 0, 0, -10, -10, 0, -10, -10, -10, -10, -10, -10, 0, -10, -10, -10,~ ## $ pde13 <dbl> 0, -10, -10, -10, -10, 0, 0, -10, -10, 1, -10, -10, -10, -10, -10, -10, 0, -10, -10, -10,~ ## $ pde14 <dbl> 1, -10, -10, -10, -10, 0, 0, -10, -10, 0, -10, -10, -10, -10, -10, -10, 0, -10, -10, -10,~ ## $ pde15 <dbl> 0, -10, -10, -10, -10, 1, 1, -10, -10, 0, -10, -10, -10, -10, -10, -10, 0, -10, -10, -10,~ ## $ pde16 <dbl> 0, -10, -10, -10, -10, 0, 0, -10, -10, 0, -10, -10, -10, -10, -10, -10, 0, -10, -10, -10,~ ## $ pde05 <dbl> 0, -10, -10, -10, -10, 0, 0, -10, -10, 0, -10, -10, -10, -10, -10, -10, 0, -10, -10, -10,~ ## $ pde17 <dbl> 3, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -~ ## $ pde18 <dbl> -10, -10, -10, -10, -10, 1, 2, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10~ ## $ pisced97 <dbl> 5, -10, -10, -10, -10, 5, 5, -10, -10, 5, -10, -10, -10, -10, -10, -10, 3, -10, -10, -10,~ ## $ piscd11 <dbl> 7, -10, -10, -10, -10, 6, 7, -10, -10, 5, -10, -10, -10, -10, -10, -10, 3, -10, -10, -10,~ ## $ pwork <dbl> 1, -10, -10, -10, -10, 3, 1, -10, -10, -9, -10, -10, -10, -10, -10, -10, 1, -10, -10, -10~ ## $ pdw01 <dbl> 5, -10, -10, -10, -10, -10, 5, -10, -10, -10, -10, -10, -10, -10, -10, -10, 6, -10, -10, ~ ## $ pdw02 <dbl> 52, -10, -10, -10, -10, -10, 53, -10, -10, -10, -10, -10, -10, -10, -10, -10, 62, -10, -1~ ## $ pisco88 <dbl> 3416, -10, -10, -10, -10, -10, -33, -10, -10, -10, -10, -10, -10, -10, -10, -10, 2122, -1~ ## $ psiops88 <dbl> 49, -10, -10, -10, -10, -10, -32, -10, -10, -10, -10, -10, -10, -10, -10, -10, 55, -10, -~ ## $ pisei88 <dbl> 50, -10, -10, -10, -10, -10, -32, -10, -10, -10, -10, -10, -10, -10, -10, -10, 71, -10, -~ ## $ pisco08 <dbl> 3323, -10, -10, -10, -10, -10, 3341, -10, -10, -10, -10, -10, -10, -10, -10, -10, 2120, -~ ## $ psiops08 <dbl> 48.86, -10.00, -10.00, -10.00, -10.00, -10.00, 48.81, -10.00, -10.00, -10.00, -10.00, -10~ ## $ pisei08 <dbl> 56.35, -10.00, -10.00, -10.00, -10.00, -10.00, 62.13, -10.00, -10.00, -10.00, -10.00, -10~ ## $ peseg <dbl> 33, -10, -10, -10, -10, 91, 33, -10, -10, -32, -10, -10, -10, -10, -10, -10, 21, -10, -10~ ## $ pdw07 <dbl> 2, -10, -10, -10, -10, -10, 2, -10, -10, -10, -10, -10, -10, -10, -10, -10, 2, -10, -10, ~ ## $ pdw03 <dbl> -10, -10, -10, -10, -10, 1, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -~ ## $ fdm01 <dbl> 996, 0, 0, 0, 996, 0, 0, -42, 0, 0, 200, 996, 0, 151, 163, 0, 0, 0, 996, 0, 0, 0, 0, 0, 0~ ## $ mdm01 <dbl> 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 200, 996, 0, 100, 163, 996, 0, 0, 996, 0, 0, 0, 0, 0, 100, ~ ## $ df44 <dbl> 1, 1, 1, 3, 1, 1, 2, 1, 1, 1, 1, 4, 1, 1, 1, 1, 1, 1, 3, 1, 1, 1, 1, 1, 1, 2, 1, 1, 1, 1,~ ## $ fdw01 <dbl> 3, 5, 3, 9, 6, 3, 4, 6, 6, -50, 4, -54, 9, -50, 6, 5, 4, 5, 6, 5, 3, 1, 6, -50, 4, -55, 6~ ## $ fdw02 <dbl> 22, 53, 23, 65, 64, 23, 41, 62, 62, -50, 40, -54, 65, -50, 61, 52, 40, 53, 64, 53, 22, 11~ ## $ fisco88 <dbl> 7412, 2149, 1300, 6100, 7129, 5122, -9, 7442, 3152, -10, -9, -10, -9, -10, 7141, 8323, 34~ ## $ fsiops88 <dbl> 33, 56, 50, 38, 28, 31, -32, 27, 54, -10, -32, -10, -32, -10, 31, 32, 52, 44, 32, 36, 44,~ ## $ fisei88 <dbl> 31, 69, 51, 23, 30, 30, -32, 31, 50, -10, -32, -10, -32, -10, 29, 30, 57, 43, 26, 51, 30,~ ## $ fisco08 <dbl> 3122, -33, 1120, 6130, 3123, 3434, -9, 7536, 7543, -10, -9, -10, -9, -10, 7131, 8331, 335~ ## $ fsiops08 <dbl> 45.94, -32.00, 64.51, 43.53, 45.94, 38.00, -32.00, 27.37, 38.81, -10.00, -32.00, -10.00, ~ ## $ fisei08 <dbl> 40.54, -32.00, 70.34, 17.79, 37.83, 50.15, -32.00, 18.07, 43.19, -10.00, -32.00, -10.00, ~ ## $ feseg <dbl> 42, 1, 11, 1, 31, 42, 1, 62, 62, 80, 1, -32, 1, 80, 61, 65, 33, 51, 61, 52, 43, 41, 65, 8~ ## $ mdw01 <dbl> 3, -56, -56, -54, -56, 5, 5, 6, 5, 6, -9, -54, 9, -56, 6, 5, -56, 5, -54, -56, -56, -56, ~ ## $ mdw02 <dbl> 22, -56, -56, -54, -56, 52, 52, 62, 53, 61, -9, -54, 65, -56, 60, 51, -56, 53, -54, -56, ~ ## $ misco88 <dbl> 3419, -10, -10, -10, -10, 5123, -9, 3320, 5122, 7436, -10, -10, -9, -10, 9132, 5220, -10,~ ## $ msiops88 <dbl> 46, -10, -10, -10, -10, 21, -32, 50, 31, 26, -10, -10, -32, -10, 21, 32, -10, 44, -10, -1~ ## $ misei88 <dbl> 55, -10, -10, -10, -10, 34, -32, 38, 30, 33, -10, -10, -32, -10, 16, 43, -10, 43, -10, -1~ ## $ misco08 <dbl> 5223, -10, -10, -10, -10, 5131, -9, 3412, 5120, 7533, -10, -10, -9, -10, 9112, 5223, -10,~ ## $ msiops08 <dbl> 42.78, -10.00, -10.00, -10.00, -10.00, 21.67, -32.00, 49.00, 30.98, 26.00, -10.00, -10.00~ ## $ misei08 <dbl> 28.48, -10.00, -10.00, -10.00, -10.00, 25.04, -32.00, 52.72, 24.53, 21.24, -10.00, -10.00~ ## $ meseg <dbl> 42, 99, 99, -32, 99, 71, 1, 34, 71, 62, -32, -32, 1, 99, 73, 71, 99, 51, -32, 99, 99, 99,~ ## $ feduc <dbl> 2, 4, 2, 2, 2, 2, 5, 2, 2, 3, -8, 2, 2, 1, 2, 2, 2, 3, 2, 5, 3, 2, 2, 2, 2, -10, 3, -9, 2~ ## $ meduc <dbl> 2, 2, -8, 2, 2, 3, 4, 2, 2, 2, -8, 2, 2, 2, 1, 2, 2, 3, 2, 5, 2, 5, 2, 2, 2, 3, 3, -9, 2,~ ## $ fde01 <dbl> 9, 10, 6, -9, -8, 9, 6, 5, 9, 6, -8, 5, 5, 5, 9, 5, 5, 6, 9, 6, 5, 5, 5, 5, 11, -10, 5, -~ ## $ mde01 <dbl> 6, 6, 1, -9, -8, 6, 9, 5, 5, 1, -8, 5, 1, -8, 1, 5, -8, 6, 5, 6, 5, 11, 6, 6, 5, 6, 5, -9~ ## $ fiscd975 <dbl> 5, 5, 3, 2, 2, 5, 4, 3, 5, 3, -32, 3, 3, 3, 5, 3, 3, 3, 5, 4, 3, 3, 3, 3, 5, -10, 3, -32,~ ## $ miscd975 <dbl> 3, 3, -32, 2, 2, 3, 5, 3, 3, 2, -32, 3, 2, 2, 1, 3, 2, 3, 3, 4, 3, 5, 3, 3, 3, 3, 3, -32,~ ## $ di01a <dbl> -15, -15, -15, -15, -15, -50, 1900, -15, 1300, -15, 356, -15, -15, -15, -15, -15, -15, -1~ ## $ di02a <dbl> 10, 19, -7, 12, -50, -10, -10, 15, -10, 13, -10, 16, 13, 14, 16, 13, 16, 20, 16, -10, -10~ ## $ incc <dbl> 10, 19, -7, 12, -50, -50, 14, 15, 11, 13, 3, 16, 13, 14, 16, 13, 16, 20, 16, 16, 21, 22, ~ ## $ dh01 <dbl> 2, 2, 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 2, 1, 1, 1, 2, 2, 2, 1, 2, 2, 1, 2, 2, 1, 1, 1,~ ## $ dh11 <dbl> -10, -10, -10, 1, 2, 1, 2, 1, 1, 4, 3, 1, 1, -10, -10, 2, 1, 3, -10, -10, -10, 3, -10, -1~ ## $ dh04 <dbl> 1, 1, 1, 2, 3, 2, 3, 2, 2, 5, 4, 2, 2, 1, 1, 3, 2, 4, 1, 1, 1, 4, 1, 1, 2, 1, 1, 2, 2, 2,~ ## $ dh09 <dbl> 1, 1, 1, 2, 3, 2, 2, 2, 2, 3, 4, 2, 2, 1, 1, 3, 2, 2, 1, 1, 1, 4, 1, 1, 2, 1, 1, 2, 2, 2,~ ## $ hh2kin <dbl> -10, -10, -10, 1, 1, 2, 2, 1, 1, 2, 16, -9, 1, -10, -10, 1, 2, 1, -10, -10, -10, 1, -10, ~ ## $ hh2sex <dbl> -10, -10, -10, 2, 1, 2, 1, 1, 2, 1, 1, 2, 1, -10, -10, 1, 2, 2, -10, -10, -10, 2, -10, -1~ ## $ hh2mborn <dbl> -15, -15, -15, -15, -15, 8, 3, -15, 12, -15, 10, -15, -15, -15, -15, -15, -15, -15, -15, ~ ## $ hh2yborn <dbl> -10, -10, -10, 1944, 1960, 1997, 1987, 1959, 1953, 1968, 1963, 1939, 1960, -10, -10, 1959~ ## $ hh2age <dbl> -10, -10, -10, 77, 61, 23, 34, 62, 67, 53, 57, 82, 61, -10, -10, 62, 57, 45, -10, -10, -1~ ## $ hh2mstat <dbl> -10, -10, -10, 1, 1, 5, 5, 1, 1, 4, 3, -9, 1, -10, -10, 1, 5, 1, -10, -10, -10, 1, -10, -~ ## $ hh3kin <dbl> -10, -10, -10, -10, 3, -10, 3, -10, -10, 3, 16, -10, -10, -10, -10, 3, -10, 3, -10, -10, ~ ## $ hh3sex <dbl> -10, -10, -10, -10, 1, -10, 2, -10, -10, 2, 1, -10, -10, -10, -10, 1, -10, 1, -10, -10, -~ ## $ hh3mborn <dbl> -15, -15, -15, -15, -15, -10, 10, -15, -10, -15, 1, -15, -15, -15, -15, -15, -15, -15, -1~ ## $ hh3yborn <dbl> -10, -10, -10, -10, 1999, -10, 2020, -10, -10, 2003, 1974, -10, -10, -10, -10, 1998, -10,~ ## $ hh3age <dbl> -10, -10, -10, -10, 22, -10, 0, -10, -10, 18, 47, -10, -10, -10, -10, 23, -10, 8, -10, -1~ ## $ hh3mstat <dbl> -10, -10, -10, -10, 5, -10, 5, -10, -10, 5, 5, -10, -10, -10, -10, 5, -10, 5, -10, -10, -~ ## $ hh4kin <dbl> -10, -10, -10, -10, -10, -10, -10, -10, -10, 3, 16, -10, -10, -10, -10, -10, -10, 3, -10,~ ## $ hh4sex <dbl> -10, -10, -10, -10, -10, -10, -10, -10, -10, 2, 1, -10, -10, -10, -10, -10, -10, 2, -10, ~ ## $ hh4mborn <dbl> -15, -15, -15, -15, -15, -10, -10, -15, -10, -15, 1, -15, -15, -15, -15, -15, -15, -15, -~ ## $ hh4yborn <dbl> -10, -10, -10, -10, -10, -10, -10, -10, -10, 2006, 1982, -10, -10, -10, -10, -10, -10, 20~ ## $ hh4age <dbl> -10, -10, -10, -10, -10, -10, -10, -10, -10, 15, 39, -10, -10, -10, -10, -10, -10, 8, -10~ ## $ hh4mstat <dbl> -10, -10, -10, -10, -10, -10, -10, -10, -10, 5, 5, -10, -10, -10, -10, -10, -10, 5, -10, ~ ## $ hh5kin <dbl> -10, -10, -10, -10, -10, -10, -10, -10, -10, 3, -10, -10, -10, -10, -10, -10, -10, -10, -~ ## $ hh5sex <dbl> -10, -10, -10, -10, -10, -10, -10, -10, -10, 1, -10, -10, -10, -10, -10, -10, -10, -10, -~ ## $ hh5mborn <dbl> -15, -15, -15, -15, -15, -10, -10, -15, -10, -15, -10, -15, -15, -15, -15, -15, -15, -15,~ ## $ hh5yborn <dbl> -10, -10, -10, -10, -10, -10, -10, -10, -10, 2008, -10, -10, -10, -10, -10, -10, -10, -10~ ## $ hh5age <dbl> -10, -10, -10, -10, -10, -10, -10, -10, -10, 13, -10, -10, -10, -10, -10, -10, -10, -10, ~ ## $ hh5mstat <dbl> -10, -10, -10, -10, -10, -10, -10, -10, -10, 5, -10, -10, -10, -10, -10, -10, -10, -10, -~ ## $ hh6kin <dbl> -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10,~ ## $ hh6sex <dbl> -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10,~ ## $ hh6mborn <dbl> -15, -15, -15, -15, -15, -10, -10, -15, -10, -15, -10, -15, -15, -15, -15, -15, -15, -15,~ ## $ hh6yborn <dbl> -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10,~ ## $ hh6age <dbl> -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10,~ ## $ hh6mstat <dbl> -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10,~ ## $ hh7kin <dbl> -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10,~ ## $ hh7sex <dbl> -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10,~ ## $ hh7mborn <dbl> -15, -15, -15, -15, -15, -10, -10, -15, -10, -15, -10, -15, -15, -15, -15, -15, -15, -15,~ ## $ hh7yborn <dbl> -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10,~ ## $ hh7age <dbl> -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10,~ ## $ hh7mstat <dbl> -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10,~ ## $ hh8kin <dbl> -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10,~ ## $ hh8sex <dbl> -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10,~ ## $ hh8mborn <dbl> -15, -15, -15, -15, -15, -10, -10, -15, -10, -15, -10, -15, -15, -15, -15, -15, -15, -15,~ ## $ hh8yborn <dbl> -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10,~ ## $ hh8age <dbl> -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10,~ ## $ hh8mstat <dbl> -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10,~ ## $ dh12 <dbl> 41, 51, 52, 11, 11, 21, 21, 11, 11, 21, 52, -32, 11, 51, 52, 11, 22, 11, 51, 51, 52, 11, ~ ## $ dh13 <dbl> 141, 151, 152, 111, 211, 121, 221, 111, 111, 221, 152, -32, 111, 151, 152, 211, 122, 211,~ ## $ dh14 <dbl> 3, 3, 4, 1, 5, 2, 6, 1, 1, 6, 4, -32, 1, 3, 4, 5, 2, 5, 3, 3, 4, 5, 3, 4, 1, 3, 3, 1, -32~ ## $ dh15 <dbl> 10, 10, 10, 11, 20, 11, 20, 11, 11, 20, 60, -32, 11, 10, 10, 20, 11, 20, 10, 10, 10, 20, ~ ## $ dh16 <dbl> 0, 0, 0, 0, 1, 0, 1, 0, 0, 1, 0, -32, 0, 0, 0, 1, 0, 1, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, ~ ## $ dh17 <dbl> 54, 53, 89, 77, 22, 23, 0, 57, 67, 13, 39, 82, 55, 26, 38, 23, 54, 8, 49, 26, 83, 21, 48,~ ## $ fh01 <dbl> -10, -11, -11, 1, 2, 2, 3, 3, 3, 3, -10, -11, 1, -10, -10, 3, -11, 4, -10, -10, -11, 3, -~ ## $ fh02 <dbl> -10, -11, -11, 1, 3, 3, 3, 5, 3, 3, -10, -11, 1, -10, -10, 2, -11, 3, -10, -10, -11, 3, -~ ## $ fh03 <dbl> -10, -11, -11, 5, 4, 5, 4, 5, 3, 3, -10, -11, 4, -10, -10, 2, -11, 4, -10, -10, -11, 4, -~ ## $ fh04 <dbl> -10, -11, -11, 1, 1, 3, 4, 1, 1, 1, -10, -11, 1, -10, -10, 2, -11, 2, -10, -10, -11, 1, -~ ## $ fh05 <dbl> -10, -11, -11, 5, 3, 3, 2, 1, 3, 3, -10, -11, 2, -10, -10, 3, -11, 3, -10, -10, -11, 5, -~ ## $ fh06 <dbl> -10, -11, -11, 1, 3, 3, 3, 1, 2, 2, -10, -11, 1, -10, -10, 3, -11, 4, -10, -10, -11, 3, -~ ## $ fh07 <dbl> -10, -11, -11, 2, 2, 4, 3, 1, 2, 2, -10, -11, 1, -10, -10, 4, -11, 2, -10, -10, -11, 3, -~ ## $ fh08 <dbl> -10, -11, -11, 4, 3, 3, 2, 3, 3, 3, -10, -11, 2, -10, -10, 2, -11, 3, -10, -10, -11, 4, -~ ## $ fh09 <dbl> -10, -11, -11, -10, -10, -10, 3, -10, -10, -50, -10, -11, -10, -10, -10, -10, -11, 3, -10~ ## $ fh10 <dbl> -10, -11, -11, -10, -10, -10, 3, -10, -10, 2, -10, -11, -10, -10, -10, -10, -11, 2, -10, ~ ## $ fh11 <dbl> -10, -11, -11, -10, -10, -10, -50, -10, -10, 2, -10, -11, -10, -10, -10, -10, -11, 2, -10~ ## $ di01b <dbl> -15, -15, -15, -15, -15, -7, 5000, -15, 1900, -15, -7, -15, -15, -15, -15, -15, -15, -15,~ ## $ di02b <dbl> -10, -10, -10, 15, 19, 12, -10, 20, -10, -7, 3, 19, 19, -10, -10, 15, 19, 20, -10, -10, -~ ## $ di05 <dbl> -15, -15, -15, -15, -15, -7, 5000, -15, 1900, -15, -7, -15, -15, -15, -15, -15, -15, -15,~ ## $ di06 <dbl> 10, 19, -7, 15, 19, 12, -10, 20, -10, -7, 3, 19, 19, 14, 16, 15, 19, 20, 16, -10, -10, -1~ ## $ hhincc <dbl> 10, 19, -7, 15, 19, 12, 23, 20, 14, -7, 3, 19, 19, 14, 16, 15, 19, 20, 16, 16, 21, 24, 17~ ## $ dk05 <dbl> 2, 2, 1, -9, 1, 2, 2, 1, 1, 2, 1, 1, 1, 2, 2, 1, 1, 2, 1, 2, 2, 2, 2, 2, 1, 2, 2, -9, 2, ~ ## $ dk06 <dbl> -10, -10, 2, -10, 4, -10, -10, 1, 3, -10, 3, 1, 2, -10, -10, 1, 2, -10, 2, -10, -10, -10,~ ## $ kh1sex <dbl> -10, -10, 2, -10, 1, -10, -10, 1, 1, -10, 2, 1, 2, -10, -10, 1, 2, -10, 2, -10, -10, -10,~ ## $ kh1yborn <dbl> -10, -10, 1954, -10, 1978, -10, -10, 1989, 1975, -10, 1998, 1960, 1985, -10, -10, 1996, 1~ ## $ kh1age <dbl> -10, -10, 66, -10, 42, -10, -10, 31, 45, -10, 22, 60, 36, -10, -10, 24, 27, -10, 17, -10,~ ## $ kh2sex <dbl> -10, -10, 1, -10, 1, -10, -10, -10, 1, -10, 1, -10, 1, -10, -10, -10, 2, -10, 2, -10, -10~ ## $ kh2yborn <dbl> -10, -10, 1964, -10, 1980, -10, -10, -10, 1979, -10, 1999, -10, 1990, -10, -10, -10, 1996~ ## $ kh2age <dbl> -10, -10, 56, -10, 40, -10, -10, -10, 41, -10, 21, -10, 31, -10, -10, -10, 24, -10, 13, -~ ## $ kh3sex <dbl> -10, -10, -10, -10, 2, -10, -10, -10, 2, -10, 1, -10, -10, -10, -10, -10, -10, -10, -10, ~ ## $ kh3yborn <dbl> -10, -10, -10, -10, 1983, -10, -10, -10, 1984, -10, 1999, -10, -10, -10, -10, -10, -10, -~ ## $ kh3age <dbl> -10, -10, -10, -10, 37, -10, -10, -10, 36, -10, 21, -10, -10, -10, -10, -10, -10, -10, -1~ ## $ kh4sex <dbl> -10, -10, -10, -10, 1, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -~ ## $ kh4yborn <dbl> -10, -10, -10, -10, 1985, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10~ ## $ kh4age <dbl> -10, -10, -10, -10, 35, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, ~ ## $ kh5sex <dbl> -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10,~ ## $ kh5yborn <dbl> -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10,~ ## $ kh5age <dbl> -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10,~ ## $ kh6sex <dbl> -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10,~ ## $ kh6yborn <dbl> -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10,~ ## $ kh6age <dbl> -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10,~ ## $ kh7sex <dbl> -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10,~ ## $ kh7yborn <dbl> -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10,~ ## $ kh7age <dbl> -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10,~ ## $ kh8sex <dbl> -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10,~ ## $ kh8yborn <dbl> -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10,~ ## $ kh8age <dbl> -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10,~ ## $ aq01 <dbl> 4, 7, 8, 7, 7, 4, 4, 7, 5, 7, 6, -9, 7, 4, 3, 7, 7, 7, 4, 4, 7, 7, 4, 7, 3, 4, 4, 7, 4, 7~ ## $ xh03 <dbl> 2, 1, 2, 2, 2, 1, 2, 2, 2, 2, 2, 1, 2, 1, 1, 2, 2, 2, 2, 1, 2, 2, 2, 2, 1, 1, 1, 2, 1, 2,~ ## $ gs01 <dbl> 4, 3, 3, 3, 4, 1, 1, 4, 3, 4, 4, 3, 4, 4, 1, 1, 4, 1, 3, 1, 2, 4, 4, 3, 3, 2, 2, 3, 3, 4,~ ## $ gd01 <dbl> -11, 9000, 2011, -11, -11, -11, 2012, -11, 1975, -11, -11, 1962, -11, -11, -11, 9000, 201~ ## $ gd02 <dbl> -32, 53, 10, -32, -32, -32, 9, -32, 46, -32, -32, 59, -32, -32, -32, 58, 7, 11, 9, 2, 36,~ ## $ dg13 <dbl> -11, -10, 5, -11, -11, -11, 6, -11, 1, -11, -11, 5, -11, -11, -11, -10, 1, 1, 1, 5, 1, -1~ ## $ dg08 <dbl> -11, 1, 2, -11, -11, -11, 1, -11, -10, -11, -11, -10, -11, -11, -11, 2, 1, 1, 1, 2, 2, -1~ ## $ dg09 <dbl> -11, -10, -10, -11, -11, -11, -10, -11, 2, -11, -11, 1, -11, -11, -11, -10, -10, -10, -10~ ## $ dg11 <dbl> -11, 1, 2, -11, -11, -11, 1, -11, 2, -11, -11, 1, -11, -11, -11, 1, 2, 2, 1, 2, 2, -11, 1~ ## $ cf01 <dbl> -11, 2, 2, -11, -11, -11, -11, -11, -11, -11, -11, 1, -11, -11, -11, -11, 2, -11, -11, -1~ ## $ cf04 <dbl> 3, -11, -11, 2, -8, 1, 2, 4, 2, 1, 2, -11, 3, 1, 1, 2, -11, 1, 2, 1, -11, 1, -11, 2, -11,~ ## $ cf05 <dbl> 4, 1, 1, 1,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bl> 3, -11, -11, 3, 2, 4, 3, 2, 1, 3, 3, -11, 2, 2, 3, 2, -11, 2, 3, 2, -11, 2, -11, 3, -11, ~ ## $ mp17 <dbl> 3, -11, -11, 3, 2, 2, 3, 2, 1, 2, 3, -11, 2, 1, 4, 2, -11, 3, 2, 2, -11, 2, -11, 2, -11, ~ ## $ mp18 <dbl> 4, -11, -11, 4, 2, 4, 4, 2, 2, 2, 3, -11, 4, 3, 5, 3, -11, 3, 2, 2, -11, 3, -11, 3, -11, ~ ## $ mp19 <dbl> 4, -11, -11, 4, 3, 4, 4, 2, 2, 3, 3, -11, 3, 3, 3, 3, -11, 4, 3, 3, -11, 2, -11, 3, -11, ~ ## $ hp01 <dbl> -11, 2, 1, -11, -11, -11, 2, -11, 1, -11, -11, 3, -11, -11, -11, 2, 2, 1, 2, 2, 2, -11, 2~ ## $ hp02 <dbl> -11, 1, 1, -11, -11, -11, 3, -11, 1, -11, -11, 2, -11, -11, -11, 3, 2, 1, 2, 2, 2, -11, 2~ ## $ hp03 <dbl> -11, 1, 2, -11, -11, -11, 2, -11, 3, -11, -11, 3, -11, -11, -11, 4, 2, 3, 2, 1, 1, -11, 2~ ## $ hp04 <dbl> -11, 1, 1, -11, -11, -11, 1, -11, 1, -11, -11, 2, -11, -11, -11, 2, 2, 1, 2, 1, 1, -11, 1~ ## $ hp05 <dbl> -11, 1, 2, -11, -11, -11, 2, -11, 1, -11, -11, 4, -11, -11, -11, 2, 1, 1, 2, 1, 1, -11, 1~ ## $ hp06 <dbl> -11, 1, 2, -11, -11, -11, 2, -11, 1, -11, -11, 2, -11, -11, -11, 3, 1, 1, 1, 1, 1, -11, 2~ ## $ hp07 <dbl> -11, 1, 2, -11, -11, -11, 3, -11, 2, -11, -11, 3, -11, -11, -11, 3, 1, 2, 3, 2, 2, -11, 1~ ## $ hp08 <dbl> -11, 3, 2, -11, -11, -11, 3, -11, 1, -11, -11, 3, -11, -11, -11, 2, 1, 1, 2, 1, 1, -11, 1~ ## $ sm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, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,~ ## $ xs06 <dbl> -10, -10, -10, -10, -10, -10, 2, -10, -10, -10, -10, 2, -10, 2, -10, -10, -10, -10, -10, ~ ## $ xs11 <dbl> 22, 81, 121, 101, 59, 112, 84, 119, 29, 54, 63, 55, 136, 95, 39, 102, 93, 84, 121, 52, 72~ ## $ xt01 <dbl> 18, 13, 11, 10, 13, 11, 10, 14, 30, 9, 17, 18, -9, 9, 10, 10, 21, 10, 10, 12, 12, 4, 23, ~ ## $ xt02 <dbl> 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, -9, 6, 6, 6, 6, 6, 6, 6, 6, 7, 6, 6, 6, -9, 6, 7, 6, ~ ## $ xt03 <dbl> 20210618, 20210613, 20210611, 20210610, 20210613, 20210611, 20210610, 20210614, 20210630,~ ## $ xt04 <dbl> 14, 15, 14, 9, 13, 19, 20, 12, 12, 18, 18, 12, -9, 22, 14, 14, 10, 14, 17, 11, 15, 8, 7, ~ ## $ xt05 <dbl> 25, 50, 15, 55, 30, 33, 53, 0, 38, 15, 58, 0, -9, 2, 10, 5, 0, 0, 0, 4, 36, 25, 50, 15, 4~ ## $ xt06 <dbl> 14.25, 15.50, 14.15, 9.55, 13.30, 19.33, 20.53, 12.00, 12.38, 18.15, 18.58, 12.00, -32.00~ ## $ xt12 <dbl> 18, 13, 11, 10, 13, 11, 10, 14, 30, 9, 17, 25, 11, 17, 10, 10, 21, 10, 10, 12, 12, 4, 23,~ ## $ xt13 <dbl> 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 7, 6, 6, 6, 6, 6, 6, 6, 6, 7, 6, 6, 6, 6, 6, 7, 6, 7,~ ## $ xt14 <dbl> 20210618, 20210613, 20210611, 20210610, 20210613, 20210611, 20210610, 20210614, 20210630,~ ## $ xt07 <dbl> 15, 17, 15, 23, 14, 20, 21, 12, 13, 19, 20, 12, 18, 21, 14, 15, 11, 14, 17, 11, 16, 9, 8,~ ## $ xt08 <dbl> 0, 4, 30, 10, 35, 29, 35, 36, 49, 2, 47, 0, 0, 44, 35, 8, 30, 12, 25, 44, 10, 12, 30, 15,~ ## $ xt09 <dbl> 15.00, 17.04, 15.30, 23.10, 14.35, 20.29, 21.35, 12.36, 13.49, 19.02, 20.47, 12.00, 18.00~ ## $ xt10 <dbl> 35, 74, 75, 795, 65, 56, 42, 36, 71, 47, 109, 10080, -32, 11502, 25, 63, 90, 12, 25, 40, ~ ## $ xt10c <dbl> 1, 3, 4, 5, 3, 2, 2, 1, 3, 2, 5, 6, -32, 6, 1, 3, 4, 1, 1, 2, 1, 2, 2, 3, 4, -32, 2, 4, 1~ ## $ land <dbl> 80, 50, 10, 160, 50, 90, 50, 70, 160, 60, 90, 120, 140, 60, 90, 50, 70, 50, 10, 60, 80, 9~ ## $ bik <dbl> 3, 3, 4, 2, 7, 8, 10, 4, 3, 4, 9, 10, -34, 3, 10, 8, 1, 10, 4, 10, 10, 7, 3, 2, 9, 10, 10~ ## $ gkpol <dbl> 3, 3, 3, 2, 3, 6, 7, 1, 3, 3, 2, 4, -34, 3, 7, 6, 1, 7, 3, 7, 6, 3, 3, 2, 4, 4, 4, 3, 3, ~ ## $ wghtpew <dbl> 1.2471753, 1.2471753, 1.2471753, 0.5066198, 1.2471753, 1.2471753, 1.2471753, 1.2471753, 0~ ## $ wghtht <dbl> 1.6857509, 1.6857509, 1.6857509, 0.8019616, 0.5619170, 0.8428755, 0.8428755, 0.8428755, 0~ ## $ wghthew <dbl> 1.2358977, 1.2358977, 1.2358977, 0.5295698, 1.2358977, 1.2358977, 1.2358977, 1.2358977, 0~ ## $ wghthtew <dbl> 2.0834156, 2.0834156, 2.0834156, 0.4246947, 0.6944719, 1.0417078, 1.0417078, 1.0417078, 0~ ``` ] --- ## Selecting variables We might want to reduce our data frame (or create a new one) to only include a **subset of specific variables**. Say, for example, we want to select only the variables that measure attitudes towards *immigration* (`mi05-mi11`) from our full data set. There are two options for doing this with `base R`: Option 1 .small[ ```r allbus_immigration <- allbus_2021[, c("mi05", "mi06", "mi07", "mi08", "mi09", "mi10","mi11")] # When subsetting with [], the first value refers to rows, the second to columns # [, c("var1", "var2", ...)] means we want to select all rows but only some specific columns. ``` ] Option 2 .small[ ```r allbus_immigration <- subset(allbus_2021, TRUE, select = c(mi05, mi06, mi07, mi08, mi09, mi10, mi11)) # Again, here the 2nd argument refers to the rows. # Setting it to TRUE means that we want to include all rows in the subset. ``` ] --- ## Selecting variables You can also select variables based on their numeric index. ```r allbus_immigration <- allbus_2021[, 39:45] names(allbus_immigration) ``` ``` ## [1] "mi05" "mi06" "mi07" "mi08" "mi09" "mi10" "mi11" ``` --- ## Selecting variables In the `tidyverse`, we can create a subset of variables with the `dplyr` verb `select()`. ```r allbus_immigration <- allbus_2021 %>% select(mi05, mi06, mi07, mi08, mi09, mi10, mi11) head(allbus_immigration) ``` ``` ## # A tibble: 6 x 7 ## mi05 mi06 mi07 mi08 mi09 mi10 mi11 ## <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> ## 1 1 1 2 1 1 1 1 ## 2 2 1 2 2 2 2 2 ## 3 3 2 3 1 1 2 2 ## 4 1 2 2 2 2 2 2 ## 5 1 2 2 2 2 2 2 ## 6 1 2 2 2 1 1 1 ``` --- ## Selecting a range of variables There also is a shorthand notation for selecting a set of consecutive columns with `select()`. ```r allbus_immigration <- allbus_2021 %>% select(mi05:mi11) head(allbus_immigration) ``` ``` ## # A tibble: 6 x 7 ## mi05 mi06 mi07 mi08 mi09 mi10 mi11 ## <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> ## 1 1 1 2 1 1 1 1 ## 2 2 1 2 2 2 2 2 ## 3 3 2 3 1 1 2 2 ## 4 1 2 2 2 2 2 2 ## 5 1 2 2 2 2 2 2 ## 6 1 2 2 2 1 1 1 ``` *Note*: You can also use this shorthand notation for the `select` argument of the `base R` function `subset()`. --- ## Selecting a range of variables Same as for `base R`, you can also use the numeric index of variables in combination with `select()` from `dplyr`. ```r allbus_immigration <- allbus_2021 %>% select(39:45) names(allbus_immigration) ``` ``` ## [1] "mi05" "mi06" "mi07" "mi08" "mi09" "mi10" "mi11" ``` --- ## Unselecting variables If you just want to exclude one or a few columns/variables, it is easier to unselect those than to select all others. Again, there's two ways to do this with `base R`. Option 1 .small[ ```r allbus_2021_cut <- allbus_2021[!(names(allbus_2021) %in% c("za_nr", "version", "doi"))] # The ! operator means "not" (i.e., it negates a condition) # The %in% operator means "is included in" (in this case the following character vector) dim(allbus_2021_cut) ``` ``` ## [1] 5342 539 ``` ] Option 2 .small[ ```r allbus_2021_cut <- subset(allbus_2021, TRUE, select = -c(za_nr, version, doi)) dim(allbus_2021_cut) ``` ``` ## [1] 5342 539 ``` ] --- ## Unselecting variables You can also use `select()` from `dplyr` to exclude one or more columns/variables. ```r allbus_2021_cut<- allbus_2021%>% select(-c(za_nr, version, doi)) dim(allbus_2021_cut) ``` ``` ## [1] 5342 539 ``` --- ## Advanced ways of selecting variables `dplyr` offers several helper functions for selecting variables. For a full list of those, you can check the [documentation for the `select()` function](https://dplyr.tidyverse.org/reference/select.html) or `?select()`. ```r allbus_2021_mj <- allbus_2021 %>% select(starts_with("mi")) allbus_2021_stat <-allbus_2021 %>% select(ends_with("stat")) glimpse(allbus_2021_stat) ``` ``` ## Rows: 5,342 ## Columns: 8 ## $ mstat <dbl> 5, 5, 3, 1, 1, 5, 5, 1, 1, 5, 3, 1, 1, 5, 4, 1, 4, 1, 5, 5, 3, 1, 5, 1, 1, 5, 5, 1, 1, 1,~ ## $ hh2mstat <dbl> -10, -10, -10, 1, 1, 5, 5, 1, 1, 4, 3, -9, 1, -10, -10, 1, 5, 1, -10, -10, -10, 1, -10, -~ ## $ hh3mstat <dbl> -10, -10, -10, -10, 5, -10, 5, -10, -10, 5, 5, -10, -10, -10, -10, 5, -10, 5, -10, -10, -~ ## $ hh4mstat <dbl> -10, -10, -10, -10, -10, -10, -10, -10, -10, 5, 5, -10, -10, -10, -10, -10, -10, 5, -10, ~ ## $ hh5mstat <dbl> -10, -10, -10, -10, -10, -10, -10, -10, -10, 5, -10, -10, -10, -10, -10, -10, -10, -10, -~ ## $ hh6mstat <dbl> -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10,~ ## $ hh7mstat <dbl> -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10,~ ## $ hh8mstat <dbl> -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10,~ ``` --- ## Advanced ways of selecting variables Another particularly useful selection helper is `where()` to select only a specific type of variables. ```r allbus_2021_num <- allbus_2021 %>% select(where(is.numeric)) %>% print() ``` ``` ## # A tibble: 5,342 x 540 ## za_nr respid substudy mode splt21 eastwest german ep01 ep03 ep04 ep06 lm01 lm02 lm19 lm20 lm21 ## <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> ## 1 5280 1 1 4 2 1 1 3 3 3 4 2 210 1 2 1 ## 2 5280 2 1 4 1 1 1 3 1 3 3 5 90 1 5 2 ## 3 5280 3 1 4 1 1 1 3 1 2 3 6 135 1 5 2 ## 4 5280 4 1 4 2 2 1 2 1 1 1 7 60 1 7 2 ## 5 5280 5 1 4 2 1 1 3 3 3 -8 7 180 1 7 1 ## 6 5280 6 1 3 2 1 1 2 1 2 3 5 45 1 3 2 ## 7 5280 7 2 3 3 1 1 -11 -11 -11 -11 3 30 1 3 2 ## 8 5280 8 1 4 2 1 1 3 2 4 4 7 -9 1 7 1 ## 9 5280 9 2 3 3 2 1 -11 -11 -11 -11 7 180 1 7 2 ## 10 5280 10 1 4 2 1 1 3 2 3 3 7 180 1 7 2 ## # ... with 5,332 more rows, and 524 more variables: lm22 <dbl>, lm14 <dbl>, xr19 <dbl>, xr20 <dbl>, ## # lm27 <dbl>, lm28 <dbl>, lm29 <dbl>, lm30 <dbl>, lm31 <dbl>, lm32 <dbl>, lm33 <dbl>, lm34 <dbl>, ## # lm35 <dbl>, lm36 <dbl>, lm37 <dbl>, lm38 <dbl>, lm39 <dbl>, la01 <dbl>, id02 <dbl>, id01 <dbl>, ## # mi05 <dbl>, mi06 <dbl>, mi07 <dbl>, mi08 <dbl>, mi09 <dbl>, mi10 <dbl>, mi11 <dbl>, sex <dbl>, ## # mborn <dbl>, yborn <dbl>, age <dbl>, agec <dbl>, dn07 <dbl>, dm02 <dbl>, dm02c <dbl>, dm03 <dbl>, ## # dg10 <dbl>, dg03 <dbl>, dm06 <dbl>, dn01 <dbl>, dn02 <dbl>, dn04 <dbl>, dn05 <dbl>, ma01b <dbl>, ## # ma02 <dbl>, ma03 <dbl>, ma04 <dbl>, mc01 <dbl>, mc02 <dbl>, mc03 <dbl>, mc04 <dbl>, pn11 <dbl>, ... ## # i Use `print(n = ...)` to see more rows, and `colnames()` to see all variable names ``` --- ## What's in a name? One thing that we need to know - and might want to change - are the names of the variables in the dataset. ```r names(allbus_2021) ``` ``` ## [1] "za_nr" "doi" "version" "respid" "substudy" "mode" "splt21" "eastwest" "german" ## [10] "ep01" "ep03" "ep04" "ep06" "lm01" "lm02" "lm19" "lm20" "lm21" ## [19] "lm22" "lm14" "xr19" "xr20" "lm27" "lm28" "lm29" "lm30" "lm31" ## [28] "lm32" "lm33" "lm34" "lm35" "lm36" "lm37" "lm38" "lm39" "la01" ## [37] "id02" "id01" "mi05" "mi06" "mi07" "mi08" "mi09" "mi10" "mi11" ## [46] "sex" "mborn" "yborn" "age" "agec" "dn07" "dm02" "dm02c" "dm03" ## [55] "dg10" "dg03" "dm06" "dn01" "dn02" "dn04" "dn05" "ma01b" "ma02" ## [64] "ma03" "ma04" "mc01" "mc02" "mc03" "mc04" "pn11" "fr07" "fr08" ## [73] "fr03b" "fr04b" "fr05b" "fr09" "fr10" "fr11" "fr12" "fe13" "fe14" ## [82] "fe15" "fe16" "fe17" "ja01" "ja02" "ja03" "ja04" "ja05" "ja06" ## [91] "ja07" "ja08" "ja09" "ja10" "ja11" "lp03" "lp04" "lp05" "lp06" ## [100] "vm08" "vm09" "vm10" "vm11" "vm12" "vm13" "vm14" "vm15" "st01" ## [109] "pt01" "pt02" "pt03" "pt04" "pt06" "pt07" "pt08" "pt09" "pt10" ## [118] "pt11" "pt12" "pt14" "pt15" "pt19" "pt20" "ca24" "cf03" "im01" ## [127] "im17" "im18" "im19" "im20" "im21" "iw04" "pd11" "pi07" "pi01" ## [136] "pi02" "pc01" "pc02" "pc03" "pc04" "pc05" "pc06" "pc07" "pc08" ## [145] "pc09" "pc10" "pc11" "pc17" "pc19" "pc20" "pa02a" "va01" "va02" ## [154] "va03" "va04" "ingle" "pa01" "ps03" "ca01" "ca02" "ca03" "ca04" ## [163] "ca05" "ca06" "ca07" "ca08" "ca09" "ca10" "ca11" "ca25" "ca26" ## [172] "ca27" "ca28" "ca29" "ca30" "ca15" "ca16" "ca17" "ca18" "ca34" ## [181] "ca31" "ca35" "ca36" "cs01" "cs02" "cs03" "cs04" "cs05" "cs06" ## [190] "cs08" "cs09" "cp01" "cp02" "cp03" "cp04" "ce01" "ce02" "ca22" ## [199] "ca23" "ca32" "ca33" "educ" "de06" "de07" "de08" "de09" "de10" ## [208] "de12" "de11" "de13" "de14" "de15" "de16" "de05" "de18" "de17" ## [217] "isced97" "iscd11" "work" "dw01" "dw02" "isco88" "siops88" "isei88" "isco08" ## [226] "siops08" "isei08" "eseg" "dw07" "dw15" "dw10" "dw16" "dw17" "dw18" ## [235] "dw19" "dw19c" "dw37" "dw03" "dw12" "dw12a" "dw12b" "dw01a" "dw02a" ## [244] "isco88a" "siops88a" "isei88a" "isco08a" "siops08a" "isei08a" "dw20" "dw22" "dw23" ## [253] "dw23c" "hs01" "hs04" "hs05" "hs06" "hs07" "hs08" "hs09" "lp09" ## [262] "lp10" "lp11" "lp12" "rb07" "rd01" "rd02" "rd03" "rp01" "rp02" ## [271] "mj01" "mj02" "mj03" "mj04" "mj05" "mj06" "mm01" "mm02" "mm03" ## [280] "mm04" "mm05" "mm06" "mstat" "scmborn" "scyborn" "scage" "scagec" "sceduc" ## [289] "scde06" "scde07" "scde08" "scde09" "scde10" "scde12" "scde11" "scde13" "scde14" ## [298] "scde15" "scde16" "scde05" "scde17" "scde18" "sciscd97" "sciscd11" "scwork" "scdw01" ## [307] "scdw02" "scisco88" "scsiop88" "scisei88" "scisco08" "scsiop08" "scisei08" "sceseg" "scdw07" ## [316] "scdw03" "dp01" "dp03" "pmborn" "pyborn" "page" "pagec" "peduc" "pde06" ## [325] "pde07" "pde08" "pde09" "pde10" "pde12" "pde11" "pde13" "pde14" "pde15" ## [334] "pde16" "pde05" "pde17" "pde18" "pisced97" "piscd11" "pwork" "pdw01" "pdw02" ## [343] "pisco88" "psiops88" "pisei88" "pisco08" "psiops08" "pisei08" "peseg" "pdw07" "pdw03" ## [352] "fdm01" "mdm01" "df44" "fdw01" "fdw02" "fisco88" "fsiops88" "fisei88" "fisco08" ## [361] "fsiops08" "fisei08" "feseg" "mdw01" "mdw02" "misco88" "msiops88" "misei88" "misco08" ## [370] "msiops08" "misei08" "meseg" "feduc" "meduc" "fde01" "mde01" "fiscd975" "miscd975" ## [379] "di01a" "di02a" "incc" "dh01" "dh11" "dh04" "dh09" "hh2kin" "hh2sex" ## [388] "hh2mborn" "hh2yborn" "hh2age" "hh2mstat" "hh3kin" "hh3sex" "hh3mborn" "hh3yborn" "hh3age" ## [397] "hh3mstat" "hh4kin" "hh4sex" "hh4mborn" "hh4yborn" "hh4age" "hh4mstat" "hh5kin" "hh5sex" ## [406] "hh5mborn" "hh5yborn" "hh5age" "hh5mstat" "hh6kin" "hh6sex" "hh6mborn" "hh6yborn" "hh6age" ## [415] "hh6mstat" "hh7kin" "hh7sex" "hh7mborn" "hh7yborn" "hh7age" "hh7mstat" "hh8kin" "hh8sex" ## [424] "hh8mborn" "hh8yborn" "hh8age" "hh8mstat" "dh12" "dh13" "dh14" "dh15" "dh16" ## [433] "dh17" "fh01" "fh02" "fh03" "fh04" "fh05" "fh06" "fh07" "fh08" ## [442] "fh09" "fh10" "fh11" "di01b" "di02b" "di05" "di06" "hhincc" "dk05" ## [451] "dk06" "kh1sex" "kh1yborn" "kh1age" "kh2sex" "kh2yborn" "kh2age" "kh3sex" "kh3yborn" ## [460] "kh3age" "kh4sex" "kh4yborn" "kh4age" "kh5sex" "kh5yborn" "kh5age" "kh6sex" "kh6yborn" ## [469] "kh6age" "kh7sex" "kh7yborn" "kh7age" "kh8sex" "kh8yborn" "kh8age" "aq01" "xh03" ## [478] "gs01" "gd01" "gd02" "dg13" "dg08" "dg09" "dg11" "cf01" "cf04" ## [487] "cf05" "cf06" "cf07" "cf08" "cf09" "cf10" "cf11" "pn12" "pn16" ## [496] "pn17" "mp16" "mp17" "mp18" "mp19" "hp01" "hp02" "hp03" "hp04" ## [505] "hp05" "hp06" "hp07" "hp08" "sm01" "sm02" "sm03" "pv01" "ls01" ## [514] "xs14" "xs01" "xs02" "xs03" "xs04" "xs05" "xs06" "xs11" "xt01" ## [523] "xt02" "xt03" "xt04" "xt05" "xt06" "xt12" "xt13" "xt14" "xt07" ## [532] "xt08" "xt09" "xt10" "xt10c" "land" "bik" "gkpol" "wghtpew" "wghtht" ## [541] "wghthew" "wghthtew" ``` --- ## What's in a name? As you can see, only a few of the variable names in the *GESIS German General Social Survey (ALLBUS) 2021* data set are self-explanatory. <br/> The other variable names are composed of codes representing - the study wave - study name - variable number - original or derived variables. <br/> Hence, for analyzing them it can make sense to **rename** them. --- ## Renaming variables It is good practice to use consistent naming conventions. Since `R` is .highlight[case-sensitive], we might want to only use lowercase letters.<br/> As spaces in variable names can cause problems, we could, e.g., decide to use 🐍 *snake_case* (🐫<br/> <br/> *camelCase* is a common alternative; for a good brief discussion of options for avoiding spaces in variable names, see this [Medium post by Patrick Divine](https://medium.com/@pddivine/string-case-styles-camel-pascal-snake-and-kebab-case-981407998841)). --- # Become an ace of case <img src="data:image/png;base64,#https://github.com/allisonhorst/stats-illustrations/raw/main/other-stats-artwork/coding_cases.png" width="80%" style="display: block; margin: auto;" /> <small><small>Artwork by [Allison Horst](https://github.com/allisonhorst/stats-illustrations) </small></small> --- ## Renaming variables You can rename individual columns/variables in `base R` as follows: ```r colnames(allbus_2021)[colnames(allbus_2021) == "lm35"] <- "internet_info_seek" ``` As for subsetting, you can also rename variables based on their numeric index. ```r colnames(allbus_2021)[4] <- "respondent_id" ``` --- ## Renaming variables An easier to use and more versatile option for renaming columns/variables is the `dplyr` function `rename()`. ```r allbus_immigration <- allbus_2021 %>% rename(immig_war = mi05, # new_name = old_name immig_prosecut = mi06, immig_economic = mi07, immig_east = mi08, immig_eu = mi09, immig_noneu = mi10, immig_family = mi11) names(allbus_immigration) ``` ``` ## [1] "za_nr" "doi" "version" "respid" "substudy" "mode" ## [7] "splt21" "eastwest" "german" "ep01" "ep03" "ep04" ## [13] "ep06" "lm01" "lm02" "lm19" "lm20" "lm21" ## [19] "lm22" "lm14" "xr19" "xr20" "lm27" "lm28" ## [25] "lm29" "lm30" "lm31" "lm32" "lm33" "lm34" ## [31] "lm35" "lm36" "lm37" "lm38" "lm39" "la01" ## [37] "id02" "id01" "immig_war" "immig_prosecut" "immig_economic" "immig_east" ## [43] "immig_eu" "immig_noneu" "immig_family" "sex" "mborn" "yborn" ## [49] "age" "agec" "dn07" "dm02" "dm02c" "dm03" ## [55] "dg10" "dg03" "dm06" "dn01" "dn02" "dn04" ## [61] "dn05" "ma01b" "ma02" "ma03" "ma04" "mc01" ## [67] "mc02" "mc03" "mc04" "pn11" "fr07" "fr08" ## [73] "fr03b" "fr04b" "fr05b" "fr09" "fr10" "fr11" ## [79] "fr12" "fe13" "fe14" "fe15" "fe16" "fe17" ## [85] "ja01" "ja02" "ja03" "ja04" "ja05" "ja06" ## [91] "ja07" "ja08" "ja09" "ja10" "ja11" "lp03" ## [97] "lp04" "lp05" "lp06" "vm08" "vm09" "vm10" ## [103] "vm11" "vm12" "vm13" "vm14" "vm15" "st01" ## [109] "pt01" "pt02" "pt03" "pt04" "pt06" "pt07" ## [115] "pt08" "pt09" "pt10" "pt11" "pt12" "pt14" ## [121] "pt15" "pt19" "pt20" "ca24" "cf03" "im01" ## [127] "im17" "im18" "im19" "im20" "im21" "iw04" ## [133] "pd11" "pi07" "pi01" "pi02" "pc01" "pc02" ## [139] "pc03" "pc04" "pc05" "pc06" "pc07" "pc08" ## [145] "pc09" "pc10" "pc11" "pc17" "pc19" "pc20" ## [151] "pa02a" "va01" "va02" "va03" "va04" "ingle" ## [157] "pa01" "ps03" "ca01" "ca02" "ca03" "ca04" ## [163] "ca05" "ca06" "ca07" "ca08" "ca09" "ca10" ## [169] "ca11" "ca25" "ca26" "ca27" "ca28" "ca29" ## [175] "ca30" "ca15" "ca16" "ca17" "ca18" "ca34" ## [181] "ca31" "ca35" "ca36" "cs01" "cs02" "cs03" ## [187] "cs04" "cs05" "cs06" "cs08" "cs09" "cp01" ## [193] "cp02" "cp03" "cp04" "ce01" "ce02" "ca22" ## [199] "ca23" "ca32" "ca33" "educ" "de06" "de07" ## [205] "de08" "de09" "de10" "de12" "de11" "de13" ## [211] "de14" "de15" "de16" "de05" "de18" "de17" ## [217] "isced97" "iscd11" "work" "dw01" "dw02" "isco88" ## [223] "siops88" "isei88" "isco08" "siops08" "isei08" "eseg" ## [229] "dw07" "dw15" "dw10" "dw16" "dw17" "dw18" ## [235] "dw19" "dw19c" "dw37" "dw03" "dw12" "dw12a" ## [241] "dw12b" "dw01a" "dw02a" "isco88a" "siops88a" "isei88a" ## [247] "isco08a" "siops08a" "isei08a" "dw20" "dw22" "dw23" ## [253] "dw23c" "hs01" "hs04" "hs05" "hs06" "hs07" ## [259] "hs08" "hs09" "lp09" "lp10" "lp11" "lp12" ## [265] "rb07" "rd01" "rd02" "rd03" "rp01" "rp02" ## [271] "mj01" "mj02" "mj03" "mj04" "mj05" "mj06" ## [277] "mm01" "mm02" "mm03" "mm04" "mm05" "mm06" ## [283] "mstat" "scmborn" "scyborn" "scage" "scagec" "sceduc" ## [289] "scde06" "scde07" "scde08" "scde09" "scde10" "scde12" ## [295] "scde11" "scde13" "scde14" "scde15" "scde16" "scde05" ## [301] "scde17" "scde18" "sciscd97" "sciscd11" "scwork" "scdw01" ## [307] "scdw02" "scisco88" "scsiop88" "scisei88" "scisco08" "scsiop08" ## [313] "scisei08" "sceseg" "scdw07" "scdw03" "dp01" "dp03" ## [319] "pmborn" "pyborn" "page" "pagec" "peduc" "pde06" ## [325] "pde07" "pde08" "pde09" "pde10" "pde12" "pde11" ## [331] "pde13" "pde14" "pde15" "pde16" "pde05" "pde17" ## [337] "pde18" "pisced97" "piscd11" "pwork" "pdw01" "pdw02" ## [343] "pisco88" "psiops88" "pisei88" "pisco08" "psiops08" "pisei08" ## [349] "peseg" "pdw07" "pdw03" "fdm01" "mdm01" "df44" ## [355] "fdw01" "fdw02" "fisco88" "fsiops88" "fisei88" "fisco08" ## [361] "fsiops08" "fisei08" "feseg" "mdw01" "mdw02" "misco88" ## [367] "msiops88" "misei88" "misco08" "msiops08" "misei08" "meseg" ## [373] "feduc" "meduc" "fde01" "mde01" "fiscd975" "miscd975" ## [379] "di01a" "di02a" "incc" "dh01" "dh11" "dh04" ## [385] "dh09" "hh2kin" "hh2sex" "hh2mborn" "hh2yborn" "hh2age" ## [391] "hh2mstat" "hh3kin" "hh3sex" "hh3mborn" "hh3yborn" "hh3age" ## [397] "hh3mstat" "hh4kin" "hh4sex" "hh4mborn" "hh4yborn" "hh4age" ## [403] "hh4mstat" "hh5kin" "hh5sex" "hh5mborn" "hh5yborn" "hh5age" ## [409] "hh5mstat" "hh6kin" "hh6sex" "hh6mborn" "hh6yborn" "hh6age" ## [415] "hh6mstat" "hh7kin" "hh7sex" "hh7mborn" "hh7yborn" "hh7age" ## [421] "hh7mstat" "hh8kin" "hh8sex" "hh8mborn" "hh8yborn" "hh8age" ## [427] "hh8mstat" "dh12" "dh13" "dh14" "dh15" "dh16" ## [433] "dh17" "fh01" "fh02" "fh03" "fh04" "fh05" ## [439] "fh06" "fh07" "fh08" "fh09" "fh10" "fh11" ## [445] "di01b" "di02b" "di05" "di06" "hhincc" "dk05" ## [451] "dk06" "kh1sex" "kh1yborn" "kh1age" "kh2sex" "kh2yborn" ## [457] "kh2age" "kh3sex" "kh3yborn" "kh3age" "kh4sex" "kh4yborn" ## [463] "kh4age" "kh5sex" "kh5yborn" "kh5age" "kh6sex" "kh6yborn" ## [469] "kh6age" "kh7sex" "kh7yborn" "kh7age" "kh8sex" "kh8yborn" ## [475] "kh8age" "aq01" "xh03" "gs01" "gd01" "gd02" ## [481] "dg13" "dg08" "dg09" "dg11" "cf01" "cf04" ## [487] "cf05" "cf06" "cf07" "cf08" "cf09" "cf10" ## [493] "cf11" "pn12" "pn16" "pn17" "mp16" "mp17" ## [499] "mp18" "mp19" "hp01" "hp02" "hp03" "hp04" ## [505] "hp05" "hp06" "hp07" "hp08" "sm01" "sm02" ## [511] "sm03" "pv01" "ls01" "xs14" "xs01" "xs02" ## [517] "xs03" "xs04" "xs05" "xs06" "xs11" "xt01" ## [523] "xt02" "xt03" "xt04" "xt05" "xt06" "xt12" ## [529] "xt13" "xt14" "xt07" "xt08" "xt09" "xt10" ## [535] "xt10c" "land" "bik" "gkpol" "wghtpew" "wghtht" ## [541] "wghthew" "wghthtew" ``` --- ## Renaming variables For some more advanced renaming options, you can use the `dplyr` function `rename_with()`. *Note*: The [`janitor` package](https://sfirke.github.io/janitor/) (which is `tidyverse`-oriented) can be used to facilitate several common data cleaning tasks. Among other things, it contains the function `clean_names()` that takes a data frame and creates column names that "are unique and consist only of the _ character, numbers, and letters" (from the help file for this function), with the default being 🐍 snake_case (but support for many other types of cases). ```r allbus_immigration %>% rename_with(toupper) %>% names() ``` ``` ## [1] "ZA_NR" "DOI" "VERSION" "RESPID" "SUBSTUDY" "MODE" ## [7] "SPLT21" "EASTWEST" "GERMAN" "EP01" "EP03" "EP04" ## [13] "EP06" "LM01" "LM02" "LM19" "LM20" "LM21" ## [19] "LM22" "LM14" "XR19" "XR20" "LM27" "LM28" ## [25] "LM29" "LM30" "LM31" "LM32" "LM33" "LM34" ## [31] "LM35" "LM36" "LM37" "LM38" "LM39" "LA01" ## [37] "ID02" "ID01" "IMMIG_WAR" "IMMIG_PROSECUT" "IMMIG_ECONOMIC" "IMMIG_EAST" ## [43] "IMMIG_EU" "IMMIG_NONEU" "IMMIG_FAMILY" "SEX" "MBORN" "YBORN" ## [49] "AGE" "AGEC" "DN07" "DM02" "DM02C" "DM03" ## [55] "DG10" "DG03" "DM06" "DN01" "DN02" "DN04" ## [61] "DN05" "MA01B" "MA02" "MA03" "MA04" "MC01" ## [67] "MC02" "MC03" "MC04" "PN11" "FR07" "FR08" ## [73] "FR03B" "FR04B" "FR05B" "FR09" "FR10" "FR11" ## [79] "FR12" "FE13" "FE14" "FE15" "FE16" "FE17" ## [85] "JA01" "JA02" "JA03" "JA04" "JA05" "JA06" ## [91] "JA07" "JA08" "JA09" "JA10" "JA11" "LP03" ## [97] "LP04" "LP05" "LP06" "VM08" "VM09" "VM10" ## [103] "VM11" "VM12" "VM13" "VM14" "VM15" "ST01" ## [109] "PT01" "PT02" "PT03" "PT04" "PT06" "PT07" ## [115] "PT08" "PT09" "PT10" "PT11" "PT12" "PT14" ## [121] "PT15" "PT19" "PT20" "CA24" "CF03" "IM01" ## [127] "IM17" "IM18" "IM19" "IM20" "IM21" "IW04" ## [133] "PD11" "PI07" "PI01" "PI02" "PC01" "PC02" ## [139] "PC03" "PC04" "PC05" "PC06" "PC07" "PC08" ## [145] "PC09" "PC10" "PC11" "PC17" "PC19" "PC20" ## [151] "PA02A" "VA01" "VA02" "VA03" "VA04" "INGLE" ## [157] "PA01" "PS03" "CA01" "CA02" "CA03" "CA04" ## [163] "CA05" "CA06" "CA07" "CA08" "CA09" "CA10" ## [169] "CA11" "CA25" "CA26" "CA27" "CA28" "CA29" ## [175] "CA30" "CA15" "CA16" "CA17" "CA18" "CA34" ## [181] "CA31" "CA35" "CA36" "CS01" "CS02" "CS03" ## [187] "CS04" "CS05" "CS06" "CS08" "CS09" "CP01" ## [193] "CP02" "CP03" "CP04" "CE01" "CE02" "CA22" ## [199] "CA23" "CA32" "CA33" "EDUC" "DE06" "DE07" ## [205] "DE08" "DE09" "DE10" "DE12" "DE11" "DE13" ## [211] "DE14" "DE15" "DE16" "DE05" "DE18" "DE17" ## [217] "ISCED97" "ISCD11" "WORK" "DW01" "DW02" "ISCO88" ## [223] "SIOPS88" "ISEI88" "ISCO08" "SIOPS08" "ISEI08" "ESEG" ## [229] "DW07" "DW15" "DW10" "DW16" "DW17" "DW18" ## [235] "DW19" "DW19C" "DW37" "DW03" "DW12" "DW12A" ## [241] "DW12B" "DW01A" "DW02A" "ISCO88A" "SIOPS88A" "ISEI88A" ## [247] "ISCO08A" "SIOPS08A" "ISEI08A" "DW20" "DW22" "DW23" ## [253] "DW23C" "HS01" "HS04" "HS05" "HS06" "HS07" ## [259] "HS08" "HS09" "LP09" "LP10" "LP11" "LP12" ## [265] "RB07" "RD01" "RD02" "RD03" "RP01" "RP02" ## [271] "MJ01" "MJ02" "MJ03" "MJ04" "MJ05" "MJ06" ## [277] "MM01" "MM02" "MM03" "MM04" "MM05" "MM06" ## [283] "MSTAT" "SCMBORN" "SCYBORN" "SCAGE" "SCAGEC" "SCEDUC" ## [289] "SCDE06" "SCDE07" "SCDE08" "SCDE09" "SCDE10" "SCDE12" ## [295] "SCDE11" "SCDE13" "SCDE14" "SCDE15" "SCDE16" "SCDE05" ## [301] "SCDE17" "SCDE18" "SCISCD97" "SCISCD11" "SCWORK" "SCDW01" ## [307] "SCDW02" "SCISCO88" "SCSIOP88" "SCISEI88" "SCISCO08" "SCSIOP08" ## [313] "SCISEI08" "SCESEG" "SCDW07" "SCDW03" "DP01" "DP03" ## [319] "PMBORN" "PYBORN" "PAGE" "PAGEC" "PEDUC" "PDE06" ## [325] "PDE07" "PDE08" "PDE09" "PDE10" "PDE12" "PDE11" ## [331] "PDE13" "PDE14" "PDE15" "PDE16" "PDE05" "PDE17" ## [337] "PDE18" "PISCED97" "PISCD11" "PWORK" "PDW01" "PDW02" ## [343] "PISCO88" "PSIOPS88" "PISEI88" "PISCO08" "PSIOPS08" "PISEI08" ## [349] "PESEG" "PDW07" "PDW03" "FDM01" "MDM01" "DF44" ## [355] "FDW01" "FDW02" "FISCO88" "FSIOPS88" "FISEI88" "FISCO08" ## [361] "FSIOPS08" "FISEI08" "FESEG" "MDW01" "MDW02" "MISCO88" ## [367] "MSIOPS88" "MISEI88" "MISCO08" "MSIOPS08" "MISEI08" "MESEG" ## [373] "FEDUC" "MEDUC" "FDE01" "MDE01" "FISCD975" "MISCD975" ## [379] "DI01A" "DI02A" "INCC" "DH01" "DH11" "DH04" ## [385] "DH09" "HH2KIN" "HH2SEX" "HH2MBORN" "HH2YBORN" "HH2AGE" ## [391] "HH2MSTAT" "HH3KIN" "HH3SEX" "HH3MBORN" "HH3YBORN" "HH3AGE" ## [397] "HH3MSTAT" "HH4KIN" "HH4SEX" "HH4MBORN" "HH4YBORN" "HH4AGE" ## [403] "HH4MSTAT" "HH5KIN" "HH5SEX" "HH5MBORN" "HH5YBORN" "HH5AGE" ## [409] "HH5MSTAT" "HH6KIN" "HH6SEX" "HH6MBORN" "HH6YBORN" "HH6AGE" ## [415] "HH6MSTAT" "HH7KIN" "HH7SEX" "HH7MBORN" "HH7YBORN" "HH7AGE" ## [421] "HH7MSTAT" "HH8KIN" "HH8SEX" "HH8MBORN" "HH8YBORN" "HH8AGE" ## [427] "HH8MSTAT" "DH12" "DH13" "DH14" "DH15" "DH16" ## [433] "DH17" "FH01" "FH02" "FH03" "FH04" "FH05" ## [439] "FH06" "FH07" "FH08" "FH09" "FH10" "FH11" ## [445] "DI01B" "DI02B" "DI05" "DI06" "HHINCC" "DK05" ## [451] "DK06" "KH1SEX" "KH1YBORN" "KH1AGE" "KH2SEX" "KH2YBORN" ## [457] "KH2AGE" "KH3SEX" "KH3YBORN" "KH3AGE" "KH4SEX" "KH4YBORN" ## [463] "KH4AGE" "KH5SEX" "KH5YBORN" "KH5AGE" "KH6SEX" "KH6YBORN" ## [469] "KH6AGE" "KH7SEX" "KH7YBORN" "KH7AGE" "KH8SEX" "KH8YBORN" ## [475] "KH8AGE" "AQ01" "XH03" "GS01" "GD01" "GD02" ## [481] "DG13" "DG08" "DG09" "DG11" "CF01" "CF04" ## [487] "CF05" "CF06" "CF07" "CF08" "CF09" "CF10" ## [493] "CF11" "PN12" "PN16" "PN17" "MP16" "MP17" ## [499] "MP18" "MP19" "HP01" "HP02" "HP03" "HP04" ## [505] "HP05" "HP06" "HP07" "HP08" "SM01" "SM02" ## [511] "SM03" "PV01" "LS01" "XS14" "XS01" "XS02" ## [517] "XS03" "XS04" "XS05" "XS06" "XS11" "XT01" ## [523] "XT02" "XT03" "XT04" "XT05" "XT06" "XT12" ## [529] "XT13" "XT14" "XT07" "XT08" "XT09" "XT10" ## [535] "XT10C" "LAND" "BIK" "GKPOL" "WGHTPEW" "WGHTHT" ## [541] "WGHTHEW" "WGHTHTEW" ``` --- ## Renaming variables We can use `rename_with()` in combination with `gsub()` (which we've already encountered in the session on *Getting Started*) to remove (or change) prefixes in variable names. ```r allbus_2021 %>% select(mi05:mi11) %>% rename_with(~ gsub("mi", "immigrat_", .x, fixed = TRUE)) %>% names() ``` ``` ## [1] "immigrat_05" "immigrat_06" "immigrat_07" "immigrat_08" "immigrat_09" "immigrat_10" "immigrat_11" ``` --- ## Re~~wind~~name selecta A nice thing about the `dplyr` verb `select` is that you can use it to select and rename variables in one step. .small[ ```r allbus_immigration <- allbus_2021 %>% select(immig_war = mi05, immig_prosecut = mi06, immig_economic = mi07, immig_east = mi08, immig_eu = mi09, immig_noneu = mi10, immig_family = mi11) head(allbus_immigration) ``` ``` ## # A tibble: 6 x 7 ## immig_war immig_prosecut immig_economic immig_east immig_eu immig_noneu immig_family ## <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> ## 1 1 1 2 1 1 1 1 ## 2 2 1 2 2 2 2 2 ## 3 3 2 3 1 1 2 2 ## 4 1 2 2 2 2 2 2 ## 5 1 2 2 2 2 2 2 ## 6 1 2 2 2 1 1 1 ``` ] --- ## Moving columns Although the positions of columns in a data frame do not matter for analyses or plotting (unless you want to select columns using their numerical index), you might want to change them. For this purpose, `dplyr` provides the `relocate()` function. ```r allbus_immigration <- allbus_immigration %>% relocate(immig_economic, .after = immig_noneu) glimpse(allbus_immigration) ``` ``` ## Rows: 5,342 ## Columns: 7 ## $ immig_war <dbl> 1, 2, 3, 1, 1, 1, 1, 2, 2, 1, -8, 2, 1, 2, 1, 2, 1, 1, 2, 2, 2, 1, 2, 2, 2, 1, 2, 2~ ## $ immig_prosecut <dbl> 1, 1, 2, 2, 2, 2, 1, 1, 2, 1, 1, 2, 2, 1, 1, 2, 1, 1, 2, 2, 2, 1, 1, 1, 2, 1, 2, 2,~ ## $ immig_east <dbl> 1, 2, 1, 2, 2, 2, 1, 1, 2, 2, -8, 1, 2, 1, 1, 2, 3, 2, 2, 2, 2, 2, 2, 2, 2, 1, 2, 2~ ## $ immig_eu <dbl> 1, 2, 1, 2, 2, 1, 1, 1, 2, 2, 2, 2, 2, 1, 1, 2, 2, 2, 2, 2, 1, 1, 2, 2, 1, 1, 2, 2,~ ## $ immig_noneu <dbl> 1, 2, 2, 2, 2, 1, 1, 2, 3, 2, 2, 3, 2, 1, 1, 2, 2, 2, 2, 2, 2, 2, 2, 2, 3, 1, 2, 2,~ ## $ immig_economic <dbl> 2, 2, 3, 2, 2, 2, 1, 3, 3, 2, 3, 2, 2, 2, 1, 2, 2, 2, 2, 2, 3, 2, 2, 2, 3, 1, 2, 2,~ ## $ immig_family <dbl> 1, 2, 2, 2, 2, 1, 1, 2, 2, 2, 1, -9, 1, 1, 1, 3, 1, 2, 1, 2, 2, 1, 2, 1, 2, 1, 1, 2~ ``` *Note*: You can also move a column before a specific other column by providing a variable name to the `.before` argument (instead of `.after`). --- class: center, middle # [Exercise](https://stefanjuenger.github.io/r-intro-gesis-2022/exercises/Exercise_2_1_1_Selecting_Renaming_Steps.html) time 🏋️♀️💪🏃🚴 ## [Solutions](https://stefanjuenger.github.io/r-intro-gesis-2022/solutions/Exercise_2_1_1_Selecting_Renaming_Steps.html) --- ## Filtering rows In `R`, you can filter rows/observations dependent on one or more conditions. To filter rows/observations you can use... - **comparison operators**: - **<** (smaller than) - **<=** (smaller than or equal to) - **==** (equal to) - **!=** (not equal to) - **>=** (larger than or equal to) - **>** (larger than) - **%in%** (included in) --- ## Filtering rows ... and combine comparisons with - **logical operators**: - **&** (and) - **|** (or) - **!** (not) - **xor** (either or, not both) --- ## Filtering rows Similar to selecting columns/variables, there are two options for filtering rows/observations with `base R`. Option 1 ```r allbus_male <-allbus_2021[which(allbus_2021$sex == 1), ] dim(allbus_male) ``` ``` ## [1] 2614 542 ``` Option 2 ```r allbus_male <- subset(allbus_2021, sex == 1) dim(allbus_male) ``` ``` ## [1] 2614 542 ``` --- ## Filtering rows The `dplyr` solution for filtering rows/observations is the verb `filter()`. ```r allbus_male <- allbus_2021 %>% filter(sex == 1) dim(allbus_male) ``` ``` ## [1] 2614 542 ``` --- ## Filtering rows based on multiple conditions ```r allbus_old_men <- allbus_2021 %>% filter(sex == 1, agec > 3, eastwest !=1) dim(allbus_old_men) ``` ``` ## [1] 380 542 ``` --- ## `dplyr::filter()` <img src="data:image/png;base64,#https://github.com/allisonhorst/stats-illustrations/raw/main/rstats-artwork/dplyr_filter.jpg" width="95%" style="display: block; margin: auto;" /> <small><small>Illustration by [Allison Horst](https://github.com/allisonhorst/stats-illustrations) </small></small> --- ## `dplyr::filter` - multiple conditions By default, multiple conditions in `filter()` are added as *&* (and). You can, however, also specify multiple conditions differently. **or** (cases for which at least one of the conditions is true) ```r allbus_old_andor_male <- allbus_2021 %>% filter(sex == 1 | agec > 3) dim(allbus_old_andor_male) ``` ``` ## [1] 3660 542 ``` --- ## `dplyr::filter` - multiple conditions **xor** (cases for which only one of the two conditions is true) ```r allbus_old_or_male <- allbus_2021 %>% filter(xor(sex == 1, agec > 3)) dim(allbus_old_or_male ) ``` ``` ## [1] 2607 542 ``` --- ## Advanced ways of filtering rows Similar to `select()` there are some helper functions for `filter()` for advanced filtering of rows. For example, you can... - Filter rows based on a range in a numeric variable ```r allbus_centrist <- allbus_2021 %>% filter(between(pa01, 4, 6)) dim(allbus_centrist) ``` ``` ## [1] 3089 542 ``` *Note*: The range specified in `between()` is inclusive (on both sides). --- ## Advanced ways of filtering rows - Filter rows based on the values of specific variables matching certain criteria ```r allbus_trust_high <- allbus_2021 %>% filter(if_all(starts_with ("pt"), ~ . >5)) # read: if the values of variables starting with pt in this df are > 5 (indicating high trust) dim(allbus_trust_high) ``` ``` ## [1] 9 542 ``` *Note*: The helper function `if_any()` can be used to specify that at least one of the variables needs to match a certain criterion. --- ## Selecting columns + filtering rows Of course, you can also combine the selection of columns and the filtering of rows. `Base R` option 1 ```r allbus_antisemit_male <- allbus_2021[which(allbus_2021$sex == 1), c("mj01", "mj02", "mj03", "mj04", "mj05", "mj06")] dim(allbus_antisemit_male) ``` ``` ## [1] 2614 6 ``` `Base R` option 2 ```r allbus_antisemit_male <- subset(allbus_2021, sex == 1, select = c(mj01, mj02, mj03, mj04, mj05, mj06)) dim(allbus_antisemit_male) ``` ``` ## [1] 2614 6 ``` --- ## Selecting columns + filtering rows The `tidyverse` approach solution for combining the selection of columns and the filtering of rows is chaining these steps together in a pipe (in this case, the order of the pipe steps does not matter). ```r allbus_antisemit_male <- allbus_2021 %>% filter(sex == 1) %>% select(mj01:mj06) dim(allbus_antisemit_male) ``` ``` ## [1] 2614 6 ``` --- ## (Re-)Arranging the order of rows Again, while this does not directly matter for analyses or plotting (unless you want to filter rows by their numeric index), you can rearrange the order of rows in a data set. In `base R` this can be achieved as follows: ```r allbus_2021<- allbus_2021[order(allbus_2021$agec),] head(allbus_2021[, 5:16]) ``` ``` ## # A tibble: 6 x 12 ## substudy mode splt21 eastwest german ep01 ep03 ep04 ep06 lm01 lm02 lm19 ## <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> ## 1 2 3 1 2 -32 -9 -9 -9 -9 -9 -9 -9 ## 2 1 4 2 2 1 3 2 3 3 7 480 1 ## 3 1 3 1 1 1 3 3 2 3 7 120 1 ## 4 1 4 1 1 -32 2 3 4 4 1 120 1 ## 5 2 4 3 1 1 -11 -11 -11 -11 7 300 1 ## 6 2 3 2 2 -32 3 3 5 5 3 120 2 ``` --- ## (Re-)Arranging the order of rows Of course, it is also possible to sort a data frame in descending order of a variable. ```r allbus_2021<- allbus_2021[order(desc(allbus_2021$agec)),] head(allbus_2021[, 5:16]) ``` ``` ## # A tibble: 6 x 12 ## substudy mode splt21 eastwest german ep01 ep03 ep04 ep06 lm01 lm02 lm19 ## <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> ## 1 2 4 1 1 1 3 2 3 3 7 90 1 ## 2 1 4 1 2 1 3 2 3 3 7 240 1 ## 3 1 4 3 1 1 -11 -11 -11 -11 7 300 1 ## 4 1 4 2 1 1 2 2 2 3 7 -9 1 ## 5 1 4 3 2 1 -11 -11 -11 -11 7 180 1 ## 6 1 4 2 1 1 2 1 4 3 7 120 1 ``` --- ## (Re-)Arranging the order of rows You can also sort your data frame by more than one variable. ```r allbus_2021 <- allbus_2021[order(allbus_2021$agec, allbus_2021$educ),] head(allbus_2021[, 6:13]) ``` ``` ## # A tibble: 6 x 8 ## mode splt21 eastwest german ep01 ep03 ep04 ep06 ## <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> ## 1 4 1 1 -32 2 3 4 4 ## 2 3 2 1 1 3 2 3 -8 ## 3 4 1 1 3 2 3 3 3 ## 4 3 3 1 1 -11 -11 -11 -11 ## 5 3 1 2 1 1 1 1 1 ## 6 4 1 1 2 3 3 2 4 ``` --- ## (Re-)Arranging the order of rows The `dplyr` verb for changing the order of rows in a data set is `arrange()` and you can use it in the same ways as the `base R` equivalent: Sorting by a single variable in ascending order, ... ```r allbus_2021 %>% arrange(agec) %>% select(6:13) %>% glimpse() ``` ``` ## Rows: 5,342 ## Columns: 8 ## $ mode <dbl> 4, 3, 4, 3, 3, 4, 4, 4, 4, 3, 4, 4, 4, 4, 4, 3, 4, 4, 3, 4, 4, 4, 3, 4, 4, 4, 3, 4, 4, 3,~ ## $ splt21 <dbl> 1, 2, 1, 3, 1, 1, 2, 1, 1, 3, 3, 1, 2, 2, 3, 2, 3, 2, 3, 3, 3, 2, 3, 2, 1, 2, 1, 2, 1, 3,~ ## $ eastwest <dbl> 1, 1, 1, 1, 2, 1, 1, 2, 2, 1, 1, 1, 2, 2, 1, 2, 2, 2, 1, 2, 1, 1, 1, 2, 2, 2, 2, 2, 2, 2,~ ## $ german <dbl> -32, 1, 3, 1, 1, 2, 1, 1, 3, 1, 1, 1, 1, 1, 1, -32, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, -~ ## $ ep01 <dbl> 2, 3, 2, -11, 1, 3, 4, 3, 3, -11, -11, 3, 4, 3, -11, 3, -11, 4, -11, -11, -11, -9, -11, 5~ ## $ ep03 <dbl> 3, 2, 3, -11, 1, 3, 5, 3, 2, -11, -11, 2, 2, 2, -11, 3, -11, 3, -11, -11, -11, 3, -11, 5,~ ## $ ep04 <dbl> 4, 3, 3, -11, 1, 2, -8, -42, 3, -11, -11, 2, 4, 3, -11, 5, -11, 5, -11, -11, -11, 4, -11,~ ## $ ep06 <dbl> 4, -8, 3, -11, 1, 4, -8, 4, 2, -11, -11, 3, 3, 3, -11, 5, -11, 5, -11, -11, -11, 3, -11, ~ ``` --- ## (Re-)Arranging the order of rows ... sorting by a single variable in descending order, ... ```r allbus_2021 %>% arrange(desc(agec)) %>% select(6:13) %>% glimpse() ``` ``` ## Rows: 5,342 ## Columns: 8 ## $ mode <dbl> 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 3, 4, 4, 4, 4, 4, 4, 4,~ ## $ splt21 <dbl> 3, 1, 3, 1, 3, 2, 3, 1, 3, 3, 1, 1, 2, 2, 3, 2, 3, 1, 2, 3, 2, 2, 2, 3, 1, 2, 1, 1, 3, 1,~ ## $ eastwest <dbl> 1, 1, 1, 2, 1, 1, 2, 1, 2, 1, 1, 2, 2, 1, 1, 1, 2, 1, 1, 1, 2, 1, 1, 1, 2, 1, 1, 1, 1, 1,~ ## $ german <dbl> 1, 1, 3, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,~ ## $ ep01 <dbl> -11, -9, -11, 3, -11, 2, -11, 2, -11, -11, 2, 2, 3, 2, -11, 3, -11, 2, 2, -11, 3, 2, 2, -~ ## $ ep03 <dbl> -11, -9, -11, 2, -11, 2, -11, 2, -11, -11, 2, 2, 1, 2, -11, 2, -11, 2, 1, -11, 1, 2, 2, -~ ## $ ep04 <dbl> -11, -9, -11, 3, -11, 2, -11, 4, -11, -11, 4, 2, 4, 3, -11, 3, -11, 4, 4, -11, 3, 2, 2, -~ ## $ ep06 <dbl> -11, -9, -11, 3, -11, 3, -11, 3, -11, -11, 3, 2, 3, 3, -11, 3, -11, 3, 3, -11, 3, 3, 3, -~ ``` --- ## (Re-)Arranging the order of rows ... sorting by more than one variable. ```r allbus_2021 %>% arrange(agec, educ) %>% select(6:13) %>% glimpse() ``` ``` ## Rows: 5,342 ## Columns: 8 ## $ mode <dbl> 4, 3, 4, 3, 3, 4, 4, 4, 4, 3, 4, 4, 4, 4, 4, 3, 4, 4, 3, 4, 4, 4, 3, 4, 4, 4, 3, 4, 4, 3,~ ## $ splt21 <dbl> 1, 2, 1, 3, 1, 1, 2, 1, 1, 3, 3, 1, 2, 2, 3, 2, 3, 2, 3, 3, 3, 2, 3, 2, 1, 2, 1, 2, 1, 3,~ ## $ eastwest <dbl> 1, 1, 1, 1, 2, 1, 1, 2, 2, 1, 1, 1, 2, 2, 1, 2, 2, 2, 1, 2, 1, 1, 1, 2, 2, 2, 2, 2, 2, 2,~ ## $ german <dbl> -32, 1, 3, 1, 1, 2, 1, 1, 3, 1, 1, 1, 1, 1, 1, -32, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, -~ ## $ ep01 <dbl> 2, 3, 2, -11, 1, 3, 4, 3, 3, -11, -11, 3, 4, 3, -11, 3, -11, 4, -11, -11, -11, -9, -11, 5~ ## $ ep03 <dbl> 3, 2, 3, -11, 1, 3, 5, 3, 2, -11, -11, 2, 2, 2, -11, 3, -11, 3, -11, -11, -11, 3, -11, 5,~ ## $ ep04 <dbl> 4, 3, 3, -11, 1, 2, -8, -42, 3, -11, -11, 2, 4, 3, -11, 5, -11, 5, -11, -11, -11, 4, -11,~ ## $ ep06 <dbl> 4, -8, 3, -11, 1, 4, -8, 4, 2, -11, -11, 3, 3, 3, -11, 5, -11, 5, -11, -11, -11, 3, -11, ~ ``` --- class: center, middle # [Exercise](https://stefanjuenger.github.io/r-intro-gesis-2022/exercises/Exercise_2_1_2_Filter_Arrange.html) time 🏋️♀️💪🏃🚴 ## [Solutions](https://stefanjuenger.github.io/r-intro-gesis-2022/solutions/Exercise_2_1_2_Filter_Arrange.html)