This is a convienece gadget that returns the variable names of a labelled (SPSS) dataset.
Load ESS Round 8 (2016) from github (as SPSS/ SAV File).
# install.packages("haven")
library(haven)
ess <- read_spss("https://github.com/systats/binoculaR/raw/master/images/ess_round8.sav")
Download package from github and proceed with the chunk.
# devtools::install_github("systats/binoculaR")
binoculaR::binoculaR(ess)
Now you can inspect the dataset by browsing through the pages or use a search term.
After selecting the rows the specific set can be looked at in the Selected
tab.
Take a look at some details of the selected variables in the Levels
tab.
Copy and Paste the code from the Code
section into R and go on with your analysis.
My friend Fabio was teaching SPSS and R to graduate students. In SPSS, you have the possiblity to click on the Binocular
icon to search for variables, which is pretty convenient. Unfortunately, Fabio lamented, one can't do that easily in R. Well, that day we sat down together and created a gadget that would do exactly that and this is why the gadget is called... binoculaR
.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.