Chapter 1 Introduction to R and RStudio
1.1 The R Language
R is a free, open-source programming language developed for statistical computing and graphics. It is open source meaning that everyone can access and contribute to its development. R was born out of S, which was intended to be a programming language focused on data analysis, and has evolved into a system used not only by computer programmers and data analysts but also by physical scientists, psychologists, journalists, etc. The first publicly available version of R was released in 2000. The latest version of R, released on 2021-05-18, is R-4.1.0.
1.1.1 Why R?
For scholarly articles published in 2018 found on Google Scholar, R is the second most frequently used data science software following SPSS. 
KDnuggets Poll 2020 - Modern Data Science Skills
KDnuggets Data Science Tools Popularity, animated
KDnuggets Poll 2019 - Core Data Science Skills
1.1.2 Statistical analysis software for data modeling
There are other statistical analysis software packages that you may be aware of. For example,
They typically expect that data are already nicely organized in columns and rows. R is a powerful tool for data modeling and data processing and visualization. R is considered a data-oriented programming language (other examples are Python, and Julia). It has the control and power of managing and analyzing data.
1.2 Install R
R is available for Windows, Mac, and Linux operating systems. To install R, go to the Comprehensive R Archive Network (CRAN), download the version compatible with your operating system. For Windows or MacOS users, you probably want to download the precompiled binary distributions (i.e., ready-to-run applications) linked at the top of the CRAN webpage.
The version downloaded includes the base R package. Often times, it is necessary to install other R packages to perform analysis. For example, for this course, we will use the [rio] (https://cran.r-project.org/web/packages/rio/index.html) package. I will show how to install packages in 1.4.4
1.3 Install RStudio
RStudio is an integrated development environment (IDE) for R. It uses R to develop codes and analysis that can be executed and has greater usability than R itself. Essentially RStudio is an interface between the user and R (there are other interfaces for R, e.g., R Commander). It depends on and adds onto R, which means that the R program has to be installed before RStudio for RStudio to implement R. Any R package or function can be used in RStudio.
To install RStudio, go to the RStudio download page, and download and install the free RStudio Desktop.
Open R Studio and you will see a window with four panes.
- R script
- R console
- Environment/History/Connections/Tutorial
- Files/Plots/Packages…
You can change the appearances and layout of the panes. Go to Tools -> Global Options -> Appearance to change the appearance.
1.4 Use RStudio
There are two basic ways for RStudio to execute your R syntax: (1) type your code directly in the R console and (2) write R script. If you type your code directly in the R console, the code will no longer be accessible after you close your R session. Writing R script is recommended if you would like to save the code (with “.R” extension). In this class, we will mainly use RStudio for our coding purpose.1
1.4.1 Basic operations
1.4.1.1 entering data
2+2 #press cmd/ctrol enter## [1] 4
1:20 #sequence## [1] 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20
print("Hello World!")## [1] "Hello World!"
1.4.1.2 assign value
a <- 5 #use <-, not =
3 -> b #can go other way, but silly
c <- d <- e <- 2 #multiple assignments1.4.1.3 multiple values
x <- c (5, 3, 6, 9) #c means combine or concatenate
x## [1] 5 3 6 9
(y <- c(1, 3, 0, 10)) #surround command with parentheses to also print## [1] 1 3 0 10
1.4.1.4 sequences
0:5 #0 through 5## [1] 0 1 2 3 4 5
5:0 #5 through 0## [1] 5 4 3 2 1 0
seq(5) #1 to 5## [1] 1 2 3 4 5
seq(5, 0, by = -2) #count down by 2 ## [1] 5 3 1
1.4.1.5 math
x + y #adds corresponding elements in x and y## [1] 6 6 6 19
x * 2 #multiplies each element in x by 2## [1] 10 6 12 18
2^4 #powers/exponents## [1] 16
sqrt(36) #squareroot## [1] 6
log(100) #natural log: base e (2.71828...)## [1] 4.60517
log10(100) #base 10 log## [1] 2
1.4.2 Data types in R
1.4.2.1 numeric
(n1 <- 3)## [1] 3
typeof(n1)## [1] "double"
(n2 <- 2.5)## [1] 2.5
typeof(n2)## [1] "double"
1.4.2.2 character
(c1 <- "c")## [1] "c"
typeof(c1)## [1] "character"
(c2 <- "a string of text")## [1] "a string of text"
typeof(c2)## [1] "character"
1.4.2.3 logical
(l1 <- TRUE) #must use uppercase## [1] TRUE
typeof(l1)## [1] "logical"
(l2 <- F) #must use uppercase## [1] FALSE
typeof(l2)## [1] "logical"
1.4.3 Data structures in R
1.4.3.1 vector
A vector has elements of the same data type.
(v1 <- c(1, 2, 3, 4, 5))## [1] 1 2 3 4 5
is.vector(v1)## [1] TRUE
(v2 <- c("a", "b", "c"))## [1] "a" "b" "c"
is.vector(v2)## [1] TRUE
(v3 <- c(TRUE, TRUE, FALSE, FALSE, TRUE))## [1] TRUE TRUE FALSE FALSE TRUE
is.vector(v3)## [1] TRUE
1.4.3.2 matrix
A matrix is two-dimensional and has elements of the same type.
(m1 <- matrix(c(T, T, F, F, T, F), nrow = 2))## [,1] [,2] [,3]
## [1,] TRUE FALSE TRUE
## [2,] TRUE FALSE FALSE
(m2 <- matrix(c("a", "b",
"c", "d"),
nrow = 2,
byrow = T)) #default is FALSE## [,1] [,2]
## [1,] "a" "b"
## [2,] "c" "d"
1.4.3.3 array
An array can be more than two dimensions
(a1 <- array(c( 1:24), c(4, 3, 2))) #four rows, three columns, and two tables## , , 1
##
## [,1] [,2] [,3]
## [1,] 1 5 9
## [2,] 2 6 10
## [3,] 3 7 11
## [4,] 4 8 12
##
## , , 2
##
## [,1] [,2] [,3]
## [1,] 13 17 21
## [2,] 14 18 22
## [3,] 15 19 23
## [4,] 16 20 24
1.4.3.4 data frame
A data frame combines vectors of the same length.
Numeric <- c(1, 2, 3)
Character <- c("a", "b", "c")
Logical <- c(T, F, T)
(df1 <- cbind(Numeric, Character, Logical)) #coerces all values to most basic data type## Numeric Character Logical
## [1,] "1" "a" "TRUE"
## [2,] "2" "b" "FALSE"
## [3,] "3" "c" "TRUE"
(df2 <- as.data.frame(cbind(Numeric, Character, Logical))) #makes a data frame with three different data types## Numeric Character Logical
## 1 1 a TRUE
## 2 2 b FALSE
## 3 3 c TRUE
(df3 <- data.frame(Numeric, Character, Logical)) #the right way!## Numeric Character Logical
## 1 1 a TRUE
## 2 2 b FALSE
## 3 3 c TRUE
1.4.3.5 list
A list can have anything.
o1 <- c(1, 2, 3)
o2 <- c("a", "b", "c", "d")
o3 <- c(T, F, T, T, F)
(list1 <- list(o1, o2, o3))## [[1]]
## [1] 1 2 3
##
## [[2]]
## [1] "a" "b" "c" "d"
##
## [[3]]
## [1] TRUE FALSE TRUE TRUE FALSE
(list2 <- list(o1, o2, o3, list1)) #lists within lists!## [[1]]
## [1] 1 2 3
##
## [[2]]
## [1] "a" "b" "c" "d"
##
## [[3]]
## [1] TRUE FALSE TRUE TRUE FALSE
##
## [[4]]
## [[4]][[1]]
## [1] 1 2 3
##
## [[4]][[2]]
## [1] "a" "b" "c" "d"
##
## [[4]][[3]]
## [1] TRUE FALSE TRUE TRUE FALSE
1.4.3.6 a few notes on R data structures
matrices and arrays are vectors with the
dimattribute.Factors are integer vectors with the
classandlevelsattributes.
. A factor is a vector that can contain only predefined values.data frames are built on top of lists and therefore have the
listtype.vectors are the most important family of data types in R. list are sometimes called generic vectors and the regular vectors are sometimes called atomic vectors.
Hadley Wickham had a good description of the relationships between different types
in his Advanced R book.
1.4.4 R packages
When you install R, the base package is installed. The datasets package with example datasets is also ready to use. Type plot(iris) in Rstudio Console, or type it in an R script file and run the syntax. The iris flower data set is a multivariate data set introduced by the British statistician Ronald Fisher.
plot(iris)For this class, we will use a few packages. Use the install.packages() function to install an R package. For example, type install.packages("rio") to install the rio package for importing and exporting data from external programs. You only need to install the package once on your computer. Note that you need to put the package names inside quotation marks.
To use the package, type either library(rio) or require(rio). You need to load the package everytime you start a new R session.
1.4.5 RStudio projects
An RStudio project saves a relative base. When you create a R Studio project, a folder is created and all the file paths are relative to this folder. You can copy and paste this folder to another place without having to change file paths. For example, you can create a data folder inside the RStudio project for this class and keep all data in this folder. And then you can import a dataset to R.
1.4.6 Import and export Data
There are several packages (e.g., foreign and haven) that can help import and export data in different statistical formats (e.g., SPSS, SAS, Stata, Excel). The one that I particularly like is the rio package. Its import() and export() functions work with different data types. Install and load rio.
install.packages("rio")
library(rio)Import an SPSS data from the data folder within the RStudio project.2
mydata <- import("data/example.sav")
head(mydata) # view first 6 observations## IDCNTRY IDBOOK IDSCHOOL IDCLASS IDSTUD IDGRADE ITSEX ITADMINI ITLANG BSBG01 BSBG03 BSBG04 BSBG05 BSBG06A BSBG06B BSBG06C BSBG06D
## 1 840 4 1 103 10301 8 1 1 1 1 1 2 5 1 1 1 1
## 2 840 5 1 103 10302 8 2 1 1 2 2 3 3 1 1 1 1
## BSBG06E BSBG06F BSBG06G BSBG06H BSBG06I BSBG06J BSBG06K BSBG07A BSBG07B BSBG08 BSBG09A BSBG09B BSBG10A BSBG10B BSBG11 BSBG12 BSBG13A
## 1 1 1 1 1 NA NA NA 7 5 5 1 1 1 NA 1 3 1
## 2 1 1 1 1 NA NA NA 7 8 6 1 1 1 NA 4 2 4
## BSBG13B BSBG13C BSBG14A BSBG14B BSBG14C BSBG14D BSBG14E BSBG14F BSBG15A BSBG15B BSBG15C BSBG15D BSBG15E BSBG15F BSBG15G BSBG16A
## 1 3 1 2 1 2 2 1 1 2 1 2 2 2 3 1 1
## 2 3 4 2 1 2 1 1 1 3 2 2 1 2 1 2 2
## BSBG16B BSBG16C BSBG16D BSBG16E BSBG16F BSBG16G BSBG16H BSBG16I BSBM17A BSBM17B BSBM17C BSBM17D BSBM17E BSBM17F BSBM17G BSBM17H
## 1 1 1 4 4 4 1 4 4 1 4 4 1 1 1 1 1
## 2 1 4 3 4 4 4 4 4 1 4 1 3 1 1 1 3
## BSBM17I BSBM18A BSBM18B BSBM18C BSBM18D BSBM18E BSBM18F BSBM18G BSBM18H BSBM18I BSBM18J BSBM19A BSBM19B BSBM19C BSBM19D BSBM19E
## 1 1 1 1 1 1 1 1 1 1 1 1 1 4 4 1 4
## 2 1 1 1 3 2 1 1 1 1 1 1 1 4 4 1 4
## BSBM19F BSBM19G BSBM19H BSBM19I BSBM20A BSBM20B BSBM20C BSBM20D BSBM20E BSBM20F BSBM20G BSBM20H BSBM20I BSBS21A BSBS21B BSBS21C
## 1 1 2 4 4 1 1 1 1 1 1 1 1 1 1 2 1
## 2 1 1 4 4 1 1 2 1 1 1 1 1 1 4 3 1
## BSBS21D BSBS21E BSBS21F BSBS21G BSBS21H BSBS21I BSBS22A BSBS22B BSBS22C BSBS22D BSBS22E BSBS22F BSBS22G BSBS22H BSBS22I BSBS22J
## 1 2 2 1 1 1 2 1 1 1 1 1 1 1 1 1 1
## 2 3 1 3 1 1 1 1 1 3 2 1 1 1 1 1 1
## BSBS23A BSBS23B BSBS23C BSBS23D BSBS23E BSBS23F BSBS23G BSBS23H BSBS24A BSBS24B BSBS24C BSBS24D BSBS24E BSBS24F BSBS24G BSBS24H
## 1 2 2 2 2 2 2 2 2 1 1 1 3 3 2 3 1
## 2 1 4 4 1 2 2 4 3 1 2 3 1 1 1 1 2
## BSBS24I BSBM25AA BSBS25AB BSBM25BA BSBS25BB BSBM26AA BSBS26AB BSBM26BA BSBS26BB BSBB21 BSBB22A BSBB22B BSBB22C BSBB22D BSBB22E BSBB22F
## 1 1 4 4 3 3 2 3 2 2 NA NA NA NA NA NA NA
## 2 1 2 4 2 3 3 3 1 1 NA NA NA NA NA NA NA
## BSBB22G BSBB22H BSBB22I BSBB23A BSBB23B BSBB23C BSBB23D BSBB23E BSBB23F BSBB23G BSBB23H BSBB23I BSBB23J BSBB24A BSBB24B BSBB24C
## 1 NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA
## 2 NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA
## BSBB24D BSBB24E BSBB24F BSBB24G BSBB24H BSBE25 BSBE26A BSBE26B BSBE26C BSBE26D BSBE26E BSBE26F BSBE26G BSBE26H BSBE26I BSBE27A BSBE27B
## 1 NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA
## 2 NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA
## BSBE27C BSBE27D BSBE27E BSBE27F BSBE27G BSBE27H BSBE27I BSBE27J BSBE28A BSBE28B BSBE28C BSBE28D BSBE28E BSBE28F BSBE28G BSBE28H BSBC29
## 1 NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA
## 2 NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA
## BSBC30A BSBC30B BSBC30C BSBC30D BSBC30E BSBC30F BSBC30G BSBC30H BSBC30I BSBC31A BSBC31B BSBC31C BSBC31D BSBC31E BSBC31F BSBC31G
## 1 NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA
## 2 NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA
## BSBC31H BSBC31I BSBC31J BSBC32A BSBC32B BSBC32C BSBC32D BSBC32E BSBC32F BSBC32G BSBC32H BSBP33 BSBP34A BSBP34B BSBP34C BSBP34D BSBP34E
## 1 NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA
## 2 NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA
## BSBP34F BSBP34G BSBP34H BSBP34I BSBP35A BSBP35B BSBP35C BSBP35D BSBP35E BSBP35F BSBP35G BSBP35H BSBP35I BSBP35J BSBP36A BSBP36B
## 1 NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA
## 2 NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA
## BSBP36C BSBP36D BSBP36E BSBP36F BSBP36G BSBP36H BSBS37A BSBS37B BSBS37C BSBS37D BSBS37E BSBS37F BSBS37G BSBS37H BSBS37I BSBM38AA
## 1 NA NA NA NA NA NA 1 1 1 3 3 2 3 1 1 4
## 2 NA NA NA NA NA NA 1 2 3 1 1 1 1 2 1 2
## BSBB38AB BSBE38AC BSBC38AD BSBP38AE BSBM38BA BSBB38BB BSBE38BC BSBC38BD BSBP38BE BSBM39AA BSBS39AB BSBM39BA BSBS39BB ITACCOMM1 IDPOP
## 1 NA NA NA NA 3 NA NA NA NA 2 3 2 2 0 2
## 2 NA NA NA NA 2 NA NA NA NA 3 3 1 1 1 2
## IDGRADER BSDAGE TOTWGT HOUWGT SENWGT WGTADJ1 WGTADJ2 WGTADJ3 WGTFAC1 WGTFAC2 WGTFAC3 JKZONE JKREP BSMMAT01 BSMMAT02 BSMMAT03
## 1 2 13.92 191.4986 0.535255 0.026184 1.102564 1 1.045454 36.91851 4.5 1 25 0 514.4249 505.7916 519.7016
## 2 2 13.92 191.4986 0.535255 0.026184 1.102564 1 1.045454 36.91851 4.5 1 25 0 587.6541 579.3172 562.0366
## BSMMAT04 BSMMAT05 BSSSCI01 BSSSCI02 BSSSCI03 BSSSCI04 BSSSCI05 BSMALG01 BSMALG02 BSMALG03 BSMALG04 BSMALG05 BSMDAT01 BSMDAT02 BSMDAT03
## 1 531.0448 542.1232 490.0679 474.9255 521.2601 493.9883 513.8363 514.5657 503.5694 540.7127 495.9604 516.0884 538.7014 555.5254 504.2005
## 2 550.9720 568.2771 571.5391 535.8830 558.9193 559.8913 592.2060 575.0255 603.4856 589.0744 516.0658 602.3520 545.7862 573.8504 579.5864
## BSMDAT04 BSMDAT05 BSMNUM01 BSMNUM02 BSMNUM03 BSMNUM04 BSMNUM05 BSMGEO01 BSMGEO02 BSMGEO03 BSMGEO04 BSMGEO05 BSSCHE01 BSSCHE02 BSSCHE03
## 1 553.7694 508.4274 512.7626 511.1604 487.0292 490.313 471.9762 516.0974 497.4462 494.0238 468.7053 434.6766 475.5856 554.9979 479.4414
## 2 490.1844 609.3757 562.7668 579.2757 594.9696 548.411 630.5318 619.2435 573.1298 605.8552 496.3814 623.6547 615.6122 598.3530 644.2855
## BSSCHE04 BSSCHE05 BSSEAR01 BSSEAR02 BSSEAR03 BSSEAR04 BSSEAR05 BSSBIO01 BSSBIO02 BSSBIO03 BSSBIO04 BSSBIO05 BSSPHY01 BSSPHY02 BSSPHY03
## 1 509.9053 516.8859 454.3833 540.0875 446.0872 465.3053 540.4619 497.7536 534.3983 529.7410 507.6892 570.4911 456.0079 513.4090 480.3403
## 2 558.5238 587.9128 600.9338 563.4683 620.5797 570.7632 591.3771 601.0626 567.6580 611.6534 563.5830 543.3118 550.5409 533.1618 577.5741
## BSSPHY04 BSSPHY05 BSMKNO01 BSMKNO02 BSMKNO03 BSMKNO04 BSMKNO05 BSMAPP01 BSMAPP02 BSMAPP03 BSMAPP04 BSMAPP05 BSMREA01 BSMREA02 BSMREA03
## 1 467.8219 543.4946 529.0403 558.7877 503.6952 492.9102 538.8042 500.4389 519.0317 510.1606 497.2687 489.3579 484.6627 494.2266 504.5591
## 2 527.0618 575.5149 593.5888 550.6020 577.6243 567.9767 564.5701 574.4144 568.5675 547.7672 556.5969 539.5741 552.9415 572.1910 584.6759
## BSMREA04 BSMREA05 BSSKNO01 BSSKNO02 BSSKNO03 BSSKNO04 BSSKNO05 BSSAPP01 BSSAPP02 BSSAPP03 BSSAPP04 BSSAPP05 BSSREA01 BSSREA02 BSSREA03
## 1 518.4353 493.1853 488.4110 491.6673 524.3182 507.8949 502.7248 549.3676 512.9106 519.5156 526.0618 495.4574 503.3588 492.6981 507.1144
## 2 601.2263 551.5208 593.9882 545.3113 591.2581 584.1462 577.5074 571.8668 570.2205 584.9571 590.2473 547.1351 582.2200 565.3724 556.9847
## BSSREA04 BSSREA05 BSMIBM01 BSMIBM02 BSMIBM03 BSMIBM04 BSMIBM05 BSSIBM01 BSSIBM02 BSSIBM03 BSSIBM04 BSSIBM05 BSBGHER BSDGHER BSBGSSB
## 1 500.9916 470.2027 3 3 3 3 3 3 2 3 3 3 10.91822 2 8.98361
## 2 570.5423 560.6985 4 4 4 4 4 4 3 4 4 4 11.62212 2 8.98361
## BSDGSSB BSBGSB BSDGSB BSBGSLM BSDGSLM BSBGEML BSDGEML BSBGSCM BSDGSCM BSBGSVM BSDGSVM BSBGSLS BSDGSLS BSBGESL BSDGESL BSBGSCS
## 1 2 7.59182 2 13.97818 1 13.60365 1 14.10390 1 13.65262 1 9.58043 2 12.94849 1 9.12033
## 2 2 8.78408 2 10.68282 2 11.13328 1 15.92523 1 12.14660 1 8.90626 2 10.86204 1 11.98495
## BSDGSCS BSBGSVS BSDGSVS BSBGSLB BSDGSLB BSBGEBL BSDGEBL BSBGSCB BSDGSCB BSBGSLE BSDGSLE BSBGEEL BSDGEEL BSBGSCE BSDGSCE BSBGSLC
## 1 3 9.90677 2 NA NA NA NA NA NA NA NA NA NA NA NA NA
## 2 1 10.71378 1 NA NA NA NA NA NA NA NA NA NA NA NA NA
## BSDGSLC BSBGECL BSDGECL BSBGSCC BSDGSCC BSBGSLP BSDGSLP BSBGEPL BSDGEPL BSBGSCP BSDGSCP BSDG06S BSDGEDUP BSDMLOWP BSDSLOWP BSDMWKHW
## 1 NA NA NA NA NA NA NA NA NA NA NA 2 1 2 2 3
## 2 NA NA NA NA NA NA NA NA NA NA NA 2 1 2 2 3
## BSDSWKHS BSDBWKHB BSDCWKHC BSDPWKHP BSDEWKHE VERSION
## 1 3 NA NA NA NA 4
## 2 3 NA NA NA NA 4
## [ reached 'max' / getOption("max.print") -- omitted 4 rows ]
Export the data.
export(mydata, file = "data/dataset_example.csv")
export(mydata, file = "data/dataset_example.xlsx")1.4.6.1 a few functions for checking data
str(mydata) ## 'data.frame': 10221 obs. of 436 variables:
## $ IDCNTRY : num 840 840 840 840 840 840 840 840 840 840 ...
## ..- attr(*, "label")= chr "Country ID - Numeric Code"
## ..- attr(*, "format.spss")= chr "F6.0"
## ..- attr(*, "labels")= Named num 1e+06
## .. ..- attr(*, "names")= chr "Omitted or invalid"
## $ IDBOOK : num 4 5 6 7 8 9 10 11 13 14 ...
## ..- attr(*, "label")= chr "Booklet ID"
## ..- attr(*, "format.spss")= chr "F2.0"
## ..- attr(*, "labels")= Named num [1:16] 0 1 2 3 4 5 6 7 8 9 ...
## .. ..- attr(*, "names")= chr [1:16] "No booklet assigned as student is excluded" "Booklet 01" "Booklet 02" "Booklet 03" ...
## $ IDSCHOOL : num 1 1 1 1 1 1 1 1 1 1 ...
## ..- attr(*, "label")= chr "School ID"
## ..- attr(*, "format.spss")= chr "F4.0"
## ..- attr(*, "labels")= Named num 9999
## .. ..- attr(*, "names")= chr "Omitted or invalid"
## $ IDCLASS : num 103 103 103 103 103 103 103 103 103 103 ...
## ..- attr(*, "label")= chr "Class ID"
## ..- attr(*, "format.spss")= chr "F6.0"
## ..- attr(*, "labels")= Named num 1e+06
## .. ..- attr(*, "names")= chr "Omitted or invalid"
## $ IDSTUD : num 10301 10302 10303 10304 10305 ...
## ..- attr(*, "label")= chr "Student ID"
## ..- attr(*, "format.spss")= chr "F8.0"
## ..- attr(*, "labels")= Named num 1e+08
## .. ..- attr(*, "names")= chr "Omitted or invalid"
## $ IDGRADE : num 8 8 8 8 8 8 8 8 8 8 ...
## ..- attr(*, "label")= chr "Grade ID"
## ..- attr(*, "format.spss")= chr "F2.0"
## ..- attr(*, "labels")= Named num [1:9] 3 4 5 6 7 8 9 10 99
## .. ..- attr(*, "names")= chr [1:9] "Grade 3" "Grade 4" "Grade 5" "Grade 6" ...
## $ ITSEX : num 1 2 2 2 2 2 1 1 2 1 ...
## ..- attr(*, "label")= chr "Sex of Students"
## ..- attr(*, "format.spss")= chr "F1.0"
## ..- attr(*, "labels")= Named num [1:3] 1 2 9
## .. ..- attr(*, "names")= chr [1:3] "Female" "Male" "Omitted or invalid"
## $ ITADMINI : num 1 1 1 1 1 1 1 1 1 1 ...
## ..- attr(*, "label")= chr "Test Administrator Position"
## ..- attr(*, "format.spss")= chr "F1.0"
## ..- attr(*, "labels")= Named num [1:4] 1 2 3 9
## .. ..- attr(*, "names")= chr [1:4] "National Center Staff" "Teacher from School" "Other" "Omitted or invalid"
## $ ITLANG : num 1 1 1 1 1 1 1 1 1 1 ...
## ..- attr(*, "label")= chr "Language of Testing"
## ..- attr(*, "format.spss")= chr "F2.0"
## ..- attr(*, "labels")= Named num [1:73] 1 2 3 4 5 7 8 9 10 11 ...
## .. ..- attr(*, "names")= chr [1:73] "English" "Spanish" "French" "Afrikaans" ...
## $ BSBG01 : num 1 2 2 2 2 2 1 1 2 1 ...
## ..- attr(*, "label")= chr "GEN\\SEX OF STUDENT"
## ..- attr(*, "format.spss")= chr "F1.0"
## ..- attr(*, "labels")= Named num [1:3] 1 2 9
## .. ..- attr(*, "names")= chr [1:3] "Girl" "Boy" "Omitted or invalid"
## $ BSBG03 : num 1 2 2 1 1 1 2 1 1 1 ...
## ..- attr(*, "label")= chr "GEN\\OFTEN SPEAK <LANG OF TEST> AT HOME"
## ..- attr(*, "format.spss")= chr "F1.0"
## ..- attr(*, "labels")= Named num [1:5] 1 2 3 4 9
## .. ..- attr(*, "names")= chr [1:5] "Always" "Almost always" "Sometimes" "Never" ...
## $ BSBG04 : num 2 3 2 2 3 3 1 4 1 5 ...
## ..- attr(*, "label")= chr "GEN\\AMOUNT OF BOOKS IN YOUR HOME"
## ..- attr(*, "format.spss")= chr "F1.0"
## ..- attr(*, "labels")= Named num [1:6] 1 2 3 4 5 9
## .. ..- attr(*, "names")= chr [1:6] "0–10 books" "11–25 books" "26–100 books" "101–200 books" ...
## $ BSBG05 : num 5 3 3 4 4 4 3 4 2 5 ...
## ..- attr(*, "label")= chr "GEN\\DIGITAL INFORMATION DEVICES"
## ..- attr(*, "format.spss")= chr "F1.0"
## ..- attr(*, "labels")= Named num [1:6] 1 2 3 4 5 9
## .. ..- attr(*, "names")= chr [1:6] "None" "1-3 devices" "4-6 devices" "7-10 devices" ...
## $ BSBG06A : num 1 1 1 1 1 1 1 1 1 1 ...
## ..- attr(*, "label")= chr "GEN\\HOME POSSESS\\COMPUTER TABLET OWN"
## ..- attr(*, "format.spss")= chr "F1.0"
## ..- attr(*, "labels")= Named num [1:3] 1 2 9
## .. ..- attr(*, "names")= chr [1:3] "Yes" "No" "Omitted or invalid"
## $ BSBG06B : num 1 1 1 1 2 1 1 1 2 1 ...
## ..- attr(*, "label")= chr "GEN\\HOME POSSESS\\COMPUTER TABLET SHARED"
## ..- attr(*, "format.spss")= chr "F1.0"
## ..- attr(*, "labels")= Named num [1:3] 1 2 9
## .. ..- attr(*, "names")= chr [1:3] "Yes" "No" "Omitted or invalid"
## $ BSBG06C : num 1 1 2 1 1 1 2 1 2 1 ...
## ..- attr(*, "label")= chr "GEN\\HOME POSSESS\\STUDY DESK"
## ..- attr(*, "format.spss")= chr "F1.0"
## ..- attr(*, "labels")= Named num [1:3] 1 2 9
## .. ..- attr(*, "names")= chr [1:3] "Yes" "No" "Omitted or invalid"
## $ BSBG06D : num 1 1 1 1 1 1 2 1 1 1 ...
## ..- attr(*, "label")= chr "GEN\\HOME POSSESS\\OWN ROOM"
## ..- attr(*, "format.spss")= chr "F1.0"
## ..- attr(*, "labels")= Named num [1:3] 1 2 9
## .. ..- attr(*, "names")= chr [1:3] "Yes" "No" "Omitted or invalid"
## $ BSBG06E : num 1 1 1 1 1 1 2 1 1 1 ...
## ..- attr(*, "label")= chr "GEN\\HOME POSSESS\\INTERNET CONNECTION"
## ..- attr(*, "format.spss")= chr "F1.0"
## ..- attr(*, "labels")= Named num [1:3] 1 2 9
## .. ..- attr(*, "names")= chr [1:3] "Yes" "No" "Omitted or invalid"
## $ BSBG06F : num 1 1 1 1 1 2 1 2 1 1 ...
## ..- attr(*, "label")= chr "GEN\\HOME POSSESS\\OWN MOBILE PHONE"
## ..- attr(*, "format.spss")= chr "F1.0"
## ..- attr(*, "labels")= Named num [1:3] 1 2 9
## .. ..- attr(*, "names")= chr [1:3] "Yes" "No" "Omitted or invalid"
## $ BSBG06G : num 1 1 1 1 1 1 2 1 1 1 ...
## ..- attr(*, "label")= chr "GEN\\HOME POSSESS\\GAMING SYSTEM"
## ..- attr(*, "format.spss")= chr "F1.0"
## ..- attr(*, "labels")= Named num [1:3] 1 2 9
## .. ..- attr(*, "names")= chr [1:3] "Yes" "No" "Omitted or invalid"
## $ BSBG06H : num 1 1 1 1 1 1 1 1 2 1 ...
## ..- attr(*, "label")= chr "GEN\\HOME POSSESS\\<COUNTRY SPECIFIC>"
## ..- attr(*, "format.spss")= chr "F1.0"
## ..- attr(*, "labels")= Named num [1:3] 1 2 9
## .. ..- attr(*, "names")= chr [1:3] "Yes" "No" "Omitted or invalid"
## $ BSBG06I : num NA NA NA NA NA NA NA NA NA NA ...
## ..- attr(*, "label")= chr "GEN\\HOME POSSESS\\<COUNTRY SPECIFIC>"
## ..- attr(*, "format.spss")= chr "F1.0"
## ..- attr(*, "labels")= Named num [1:3] 1 2 9
## .. ..- attr(*, "names")= chr [1:3] "Yes" "No" "Omitted or invalid"
## $ BSBG06J : num NA NA NA NA NA NA NA NA NA NA ...
## ..- attr(*, "label")= chr "GEN\\HOME POSSESS\\<COUNTRY SPECIFIC>"
## ..- attr(*, "format.spss")= chr "F1.0"
## ..- attr(*, "labels")= Named num [1:3] 1 2 9
## .. ..- attr(*, "names")= chr [1:3] "Yes" "No" "Omitted or invalid"
## $ BSBG06K : num NA NA NA NA NA NA NA NA NA NA ...
## ..- attr(*, "label")= chr "GEN\\HOME POSSESS\\<COUNTRY SPECIFIC>"
## ..- attr(*, "format.spss")= chr "F1.0"
## ..- attr(*, "labels")= Named num [1:3] 1 2 9
## .. ..- attr(*, "names")= chr [1:3] "Yes" "No" "Omitted or invalid"
## $ BSBG07A : num 7 7 2 7 7 5 2 5 6 6 ...
## ..- attr(*, "label")= chr "GEN\\HIGHEST LVL OF EDU OF MOTHER"
## ..- attr(*, "format.spss")= chr "F2.0"
## ..- attr(*, "labels")= Named num [1:9] 1 2 3 4 5 6 7 8 99
## .. ..- attr(*, "names")= chr [1:9] "Some Primary or Lower secondary or did not go to school" "Lower secondary" "Upper secondary" "Post-secondary, non-tertiary" ...
## $ BSBG07B : num 5 8 2 3 8 3 2 5 5 6 ...
## ..- attr(*, "label")= chr "GEN\\HIGHEST LVL OF EDU OF FATHER"
## ..- attr(*, "format.spss")= chr "F2.0"
## ..- attr(*, "labels")= Named num [1:9] 1 2 3 4 5 6 7 8 99
## .. ..- attr(*, "names")= chr [1:9] "Some Primary or Lower secondary or did not go to school" "Lower secondary" "Upper secondary" "Post-secondary, non-tertiary" ...
## $ BSBG08 : num 5 6 5 6 6 5 5 4 5 5 ...
## ..- attr(*, "label")= chr "GEN\\HOW FAR IN EDU DO YOU EXPECT TO GO"
## ..- attr(*, "format.spss")= chr "F1.0"
## ..- attr(*, "labels")= Named num [1:7] 1 2 3 4 5 6 9
## .. ..- attr(*, "names")= chr [1:7] "Finish Lower secondary" "Finish Upper secondary" "Finish Post-secondary, non-tertiary" "Finish Short-cycle tertiary" ...
## $ BSBG09A : num 1 1 2 1 1 1 2 1 1 1 ...
## ..- attr(*, "label")= chr "GEN\\MOTHER BORN IN <COUNTRY>"
## ..- attr(*, "format.spss")= chr "F1.0"
## ..- attr(*, "labels")= Named num [1:4] 1 2 3 9
## .. ..- attr(*, "names")= chr [1:4] "Yes" "No" "I don't know" "Omitted or invalid"
## $ BSBG09B : num 1 1 2 1 1 1 2 1 3 1 ...
## ..- attr(*, "label")= chr "GEN\\FATHER BORN IN <COUNTRY>"
## ..- attr(*, "format.spss")= chr "F1.0"
## ..- attr(*, "labels")= Named num [1:4] 1 2 3 9
## .. ..- attr(*, "names")= chr [1:4] "Yes" "No" "I don't know" "Omitted or invalid"
## $ BSBG10A : num 1 1 2 1 1 1 2 1 1 1 ...
## ..- attr(*, "label")= chr "GEN\\BORN IN <COUNTRY>"
## ..- attr(*, "format.spss")= chr "F1.0"
## ..- attr(*, "labels")= Named num [1:3] 1 2 9
## .. ..- attr(*, "names")= chr [1:3] "Yes" "No" "Omitted or invalid"
## $ BSBG10B : num NA NA 3 NA NA NA 3 NA NA NA ...
## ..- attr(*, "label")= chr "GEN\\BORN IN <COUNTRY>\\AGE CAME TO COUNTRY"
## ..- attr(*, "format.spss")= chr "F1.0"
## ..- attr(*, "labels")= Named num [1:5] 1 2 3 6 9
## .. ..- attr(*, "names")= chr [1:5] "Older than 10 years old" "5 to 10 years old" "Younger than 5 years old" "Logically not applicable" ...
## $ BSBG11 : num 1 4 4 4 4 3 4 3 1 3 ...
## ..- attr(*, "label")= chr "GEN\\ABOUT HOW OFTEN ABSENT FROM SCHOOL"
## ..- attr(*, "format.spss")= chr "F1.0"
## ..- attr(*, "labels")= Named num [1:5] 1 2 3 4 9
## .. ..- attr(*, "names")= chr [1:5] "Once a week or more" "Once every two weeks" "Once a month" "Never or almost never" ...
## $ BSBG12 : num 3 2 1 2 2 2 1 1 2 1 ...
## ..- attr(*, "label")= chr "GEN\\HOW OFTEN BREAKFAST ON SCHOOL DAYS"
## ..- attr(*, "format.spss")= chr "F1.0"
## ..- attr(*, "labels")= Named num [1:5] 1 2 3 4 9
## .. ..- attr(*, "names")= chr [1:5] "Every day" "Most days" "Sometimes" "Never or almost never" ...
## $ BSBG13A : num 1 4 3 1 1 1 1 4 1 1 ...
## ..- attr(*, "label")= chr "GEN\\HOW OFTEN USE COMPUTER TABLET\\HOME"
## ..- attr(*, "format.spss")= chr "F1.0"
## ..- attr(*, "labels")= Named num [1:5] 1 2 3 4 9
## .. ..- attr(*, "names")= chr [1:5] "Every day or almost every day" "Once or twice a week" "Once or twice a month" "Never or almost never" ...
## $ BSBG13B : num 3 3 3 2 1 1 2 4 1 1 ...
## ..- attr(*, "label")= chr "GEN\\HOW OFTEN USE COMPUTER TABLET\\SCHOOL"
## ..- attr(*, "format.spss")= chr "F1.0"
## ..- attr(*, "labels")= Named num [1:5] 1 2 3 4 9
## .. ..- attr(*, "names")= chr [1:5] "Every day or almost every day" "Once or twice a week" "Once or twice a month" "Never or almost never" ...
## $ BSBG13C : num 1 4 4 1 4 1 4 4 1 2 ...
## ..- attr(*, "label")= chr "GEN\\HOW OFTEN USE COMPUTER TABLET\\OTHER"
## ..- attr(*, "format.spss")= chr "F1.0"
## ..- attr(*, "labels")= Named num [1:5] 1 2 3 4 9
## .. ..- attr(*, "names")= chr [1:5] "Every day or almost every day" "Once or twice a week" "Once or twice a month" "Never or almost never" ...
## $ BSBG14A : num 2 2 2 2 1 1 1 1 2 2 ...
## ..- attr(*, "label")= chr "GEN\\INTERNET USE\\ACCESS TEXTBOOKS"
## ..- attr(*, "format.spss")= chr "F1.0"
## ..- attr(*, "labels")= Named num [1:3] 1 2 9
## .. ..- attr(*, "names")= chr [1:3] "Yes" "No" "Omitted or invalid"
## $ BSBG14B : num 1 1 1 1 1 2 1 1 2 1 ...
## ..- attr(*, "label")= chr "GEN\\INTERNET USE\\ACCESS ASSIGNMENTS"
## ..- attr(*, "format.spss")= chr "F1.0"
## ..- attr(*, "labels")= Named num [1:3] 1 2 9
## .. ..- attr(*, "names")= chr [1:3] "Yes" "No" "Omitted or invalid"
## $ BSBG14C : num 2 2 2 1 2 1 1 2 2 1 ...
## ..- attr(*, "label")= chr "GEN\\INTERNET USE\\COLLABORATE WITH CLASSMATES"
## ..- attr(*, "format.spss")= chr "F1.0"
## ..- attr(*, "labels")= Named num [1:3] 1 2 9
## .. ..- attr(*, "names")= chr [1:3] "Yes" "No" "Omitted or invalid"
## $ BSBG14D : num 2 1 2 1 2 1 2 1 2 2 ...
## ..- attr(*, "label")= chr "GEN\\INTERNET USE\\COMMUNICATE WITH TEACHER"
## ..- attr(*, "format.spss")= chr "F1.0"
## ..- attr(*, "labels")= Named num [1:3] 1 2 9
## .. ..- attr(*, "names")= chr [1:3] "Yes" "No" "Omitted or invalid"
## $ BSBG14E : num 1 1 1 1 1 1 1 1 2 2 ...
## ..- attr(*, "label")= chr "GEN\\INTERNET USE\\FIND INFO TO AID IN MATH"
## ..- attr(*, "format.spss")= chr "F1.0"
## ..- attr(*, "labels")= Named num [1:3] 1 2 9
## .. ..- attr(*, "names")= chr [1:3] "Yes" "No" "Omitted or invalid"
## $ BSBG14F : num 1 1 1 2 1 1 1 1 2 1 ...
## ..- attr(*, "label")= chr "GEN\\INTERNET USE\\FIND INFO TO AID IN SCIENCE"
## ..- attr(*, "format.spss")= chr "F1.0"
## ..- attr(*, "labels")= Named num [1:3] 1 2 9
## .. ..- attr(*, "names")= chr [1:3] "Yes" "No" "Omitted or invalid"
## $ BSBG15A : num 2 3 2 2 3 1 2 2 2 2 ...
## ..- attr(*, "label")= chr "GEN\\AGREE\\BEING IN SCHOOL"
## ..- attr(*, "format.spss")= chr "F1.0"
## ..- attr(*, "labels")= Named num [1:5] 1 2 3 4 9
## .. ..- attr(*, "names")= chr [1:5] "Agree a lot" "Agree a little" "Disagree a little" "Disagree a lot" ...
## $ BSBG15B : num 1 2 3 1 4 1 1 1 2 1 ...
## ..- attr(*, "label")= chr "GEN\\AGREE\\SAFE AT SCHOOL"
## ..- attr(*, "format.spss")= chr "F1.0"
## ..- attr(*, "labels")= Named num [1:5] 1 2 3 4 9
## .. ..- attr(*, "names")= chr [1:5] "Agree a lot" "Agree a little" "Disagree a little" "Disagree a lot" ...
## $ BSBG15C : num 2 2 2 1 2 2 1 1 1 1 ...
## ..- attr(*, "label")= chr "GEN\\AGREE\\BELONG AT SCHOOL"
## ..- attr(*, "format.spss")= chr "F1.0"
## ..- attr(*, "labels")= Named num [1:5] 1 2 3 4 9
## .. ..- attr(*, "names")= chr [1:5] "Agree a lot" "Agree a little" "Disagree a little" "Disagree a lot" ...
## $ BSBG15D : num 2 1 1 1 2 1 1 1 1 1 ...
## ..- attr(*, "label")= chr "GEN\\AGREE\\LIKE TO SEE CLASSMATES"
## ..- attr(*, "format.spss")= chr "F1.0"
## ..- attr(*, "labels")= Named num [1:5] 1 2 3 4 9
## .. ..- attr(*, "names")= chr [1:5] "Agree a lot" "Agree a little" "Disagree a little" "Disagree a lot" ...
## $ BSBG15E : num 2 2 3 3 3 1 3 1 3 2 ...
## ..- attr(*, "label")= chr "GEN\\AGREE\\FAIR TEACHERS"
## ..- attr(*, "format.spss")= chr "F1.0"
## ..- attr(*, "labels")= Named num [1:5] 1 2 3 4 9
## .. ..- attr(*, "names")= chr [1:5] "Agree a lot" "Agree a little" "Disagree a little" "Disagree a lot" ...
## $ BSBG15F : num 3 1 2 3 2 1 1 1 2 1 ...
## ..- attr(*, "label")= chr "GEN\\AGREE\\PROUD TO GO TO THIS SCHOOL"
## ..- attr(*, "format.spss")= chr "F1.0"
## ..- attr(*, "labels")= Named num [1:5] 1 2 3 4 9
## .. ..- attr(*, "names")= chr [1:5] "Agree a lot" "Agree a little" "Disagree a little" "Disagree a lot" ...
## $ BSBG15G : num 1 2 2 1 1 1 1 1 2 1 ...
## ..- attr(*, "label")= chr "GEN\\AGREE\\LEARN A LOT"
## ..- attr(*, "format.spss")= chr "F1.0"
## ..- attr(*, "labels")= Named num [1:5] 1 2 3 4 9
## .. ..- attr(*, "names")= chr [1:5] "Agree a lot" "Agree a little" "Disagree a little" "Disagree a lot" ...
## $ BSBG16A : num 1 2 4 4 3 3 4 4 1 3 ...
## ..- attr(*, "label")= chr "GEN\\HOW OFTEN\\MADE FUN OF"
## ..- attr(*, "format.spss")= chr "F1.0"
## ..- attr(*, "labels")= Named num [1:5] 1 2 3 4 9
## .. ..- attr(*, "names")= chr [1:5] "At least once a week" "Once or twice a month" "A few times a year" "Never" ...
## $ BSBG16B : num 1 1 4 4 4 4 4 4 4 4 ...
## ..- attr(*, "label")= chr "GEN\\HOW OFTEN\\LEFT OUT OF GAMES"
## ..- attr(*, "format.spss")= chr "F1.0"
## ..- attr(*, "labels")= Named num [1:5] 1 2 3 4 9
## .. ..- attr(*, "names")= chr [1:5] "At least once a week" "Once or twice a month" "A few times a year" "Never" ...
## $ BSBG16C : num 1 4 4 4 3 3 4 4 4 4 ...
## ..- attr(*, "label")= chr "GEN\\HOW OFTEN\\SPREAD LIES ABOUT ME"
## ..- attr(*, "format.spss")= chr "F1.0"
## ..- attr(*, "labels")= Named num [1:5] 1 2 3 4 9
## .. ..- attr(*, "names")= chr [1:5] "At least once a week" "Once or twice a month" "A few times a year" "Never" ...
## $ BSBG16D : num 4 3 4 4 2 4 3 4 4 3 ...
## ..- attr(*, "label")= chr "GEN\\HOW OFTEN\\STOLE STH FROM ME"
## ..- attr(*, "format.spss")= chr "F1.0"
## ..- attr(*, "labels")= Named num [1:5] 1 2 3 4 9
## .. ..- attr(*, "names")= chr [1:5] "At least once a week" "Once or twice a month" "A few times a year" "Never" ...
## $ BSBG16E : num 4 4 4 4 4 4 4 4 4 4 ...
## ..- attr(*, "label")= chr "GEN\\HOW OFTEN\\HURT BY OTHERS"
## ..- attr(*, "format.spss")= chr "F1.0"
## ..- attr(*, "labels")= Named num [1:5] 1 2 3 4 9
## .. ..- attr(*, "names")= chr [1:5] "At least once a week" "Once or twice a month" "A few times a year" "Never" ...
## $ BSBG16F : num 4 4 4 4 4 4 4 4 4 4 ...
## ..- attr(*, "label")= chr "GEN\\HOW OFTEN\\FORCE TO DO STH"
## ..- attr(*, "format.spss")= chr "F1.0"
## ..- attr(*, "labels")= Named num [1:5] 1 2 3 4 9
## .. ..- attr(*, "names")= chr [1:5] "At least once a week" "Once or twice a month" "A few times a year" "Never" ...
## $ BSBG16G : num 1 4 4 4 2 4 4 4 4 4 ...
## ..- attr(*, "label")= chr "GEN\\HOW OFTEN\\EMBARRASSING INFO"
## ..- attr(*, "format.spss")= chr "F1.0"
## ..- attr(*, "labels")= Named num [1:5] 1 2 3 4 9
## .. ..- attr(*, "names")= chr [1:5] "At least once a week" "Once or twice a month" "A few times a year" "Never" ...
## $ BSBG16H : num 4 4 4 4 4 4 4 4 4 4 ...
## ..- attr(*, "label")= chr "GEN\\HOW OFTEN\\POSTED EMBARRASSING THINGS"
## ..- attr(*, "format.spss")= chr "F1.0"
## ..- attr(*, "labels")= Named num [1:5] 1 2 3 4 9
## .. ..- attr(*, "names")= chr [1:5] "At least once a week" "Once or twice a month" "A few times a year" "Never" ...
## $ BSBG16I : num 4 4 4 4 4 4 4 4 4 4 ...
## ..- attr(*, "label")= chr "GEN\\HOW OFTEN\\THREATENED"
## ..- attr(*, "format.spss")= chr "F1.0"
## ..- attr(*, "labels")= Named num [1:5] 1 2 3 4 9
## .. ..- attr(*, "names")= chr [1:5] "At least once a week" "Once or twice a month" "A few times a year" "Never" ...
## $ BSBM17A : num 1 1 1 1 2 1 3 2 3 2 ...
## ..- attr(*, "label")= chr "MATH\\AGREE\\ENJOY LEARNING MATHEMATICS"
## ..- attr(*, "format.spss")= chr "F1.0"
## ..- attr(*, "labels")= Named num [1:5] 1 2 3 4 9
## .. ..- attr(*, "names")= chr [1:5] "Agree a lot" "Agree a little" "Disagree a little" "Disagree a lot" ...
## $ BSBM17B : num 4 4 4 4 1 2 3 4 1 3 ...
## ..- attr(*, "label")= chr "MATH\\AGREE\\WISH HAVE NOT TO STUDY MATH"
## ..- attr(*, "format.spss")= chr "F1.0"
## ..- attr(*, "labels")= Named num [1:5] 1 2 3 4 9
## .. ..- attr(*, "names")= chr [1:5] "Agree a lot" "Agree a little" "Disagree a little" "Disagree a lot" ...
## $ BSBM17C : num 4 1 4 4 4 2 2 4 1 3 ...
## ..- attr(*, "label")= chr "MATH\\AGREE\\MATH IS BORING"
## ..- attr(*, "format.spss")= chr "F1.0"
## ..- attr(*, "labels")= Named num [1:5] 1 2 3 4 9
## .. ..- attr(*, "names")= chr [1:5] "Agree a lot" "Agree a little" "Disagree a little" "Disagree a lot" ...
## $ BSBM17D : num 1 3 1 1 1 1 3 2 4 2 ...
## ..- attr(*, "label")= chr "MATH\\AGREE\\LEARN INTERESTING THINGS"
## ..- attr(*, "format.spss")= chr "F1.0"
## ..- attr(*, "labels")= Named num [1:5] 1 2 3 4 9
## .. ..- attr(*, "names")= chr [1:5] "Agree a lot" "Agree a little" "Disagree a little" "Disagree a lot" ...
## $ BSBM17E : num 1 1 1 1 1 1 4 2 4 2 ...
## ..- attr(*, "label")= chr "MATH\\AGREE\\LIKE MATHEMATICS"
## ..- attr(*, "format.spss")= chr "F1.0"
## ..- attr(*, "labels")= Named num [1:5] 1 2 3 4 9
## .. ..- attr(*, "names")= chr [1:5] "Agree a lot" "Agree a little" "Disagree a little" "Disagree a lot" ...
## $ BSBM17F : num 1 1 1 2 2 3 4 3 4 2 ...
## ..- attr(*, "label")= chr "MATH\\AGREE\\LIKE NUMBERS"
## ..- attr(*, "format.spss")= chr "F1.0"
## ..- attr(*, "labels")= Named num [1:5] 1 2 3 4 9
## .. ..- attr(*, "names")= chr [1:5] "Agree a lot" "Agree a little" "Disagree a little" "Disagree a lot" ...
## $ BSBM17G : num 1 1 1 1 2 2 4 3 4 3 ...
## ..- attr(*, "label")= chr "MATH\\AGREE\\LIKE MATH PROBLEMS"
## ..- attr(*, "format.spss")= chr "F1.0"
## ..- attr(*, "labels")= Named num [1:5] 1 2 3 4 9
## .. ..- attr(*, "names")= chr [1:5] "Agree a lot" "Agree a little" "Disagree a little" "Disagree a lot" ...
## $ BSBM17H : num 1 3 1 1 3 2 4 2 4 2 ...
## ..- attr(*, "label")= chr "MATH\\AGREE\\LOOK FORWARD TO MATH CLASS"
## ..- attr(*, "format.spss")= chr "F1.0"
## ..- attr(*, "labels")= Named num [1:5] 1 2 3 4 9
## .. ..- attr(*, "names")= chr [1:5] "Agree a lot" "Agree a little" "Disagree a little" "Disagree a lot" ...
## $ BSBM17I : num 1 1 1 1 2 2 4 2 4 2 ...
## ..- attr(*, "label")= chr "MATH\\AGREE\\FAVORITE SUBJECT"
## ..- attr(*, "format.spss")= chr "F1.0"
## ..- attr(*, "labels")= Named num [1:5] 1 2 3 4 9
## .. ..- attr(*, "names")= chr [1:5] "Agree a lot" "Agree a little" "Disagree a little" "Disagree a lot" ...
## $ BSBM18A : num 1 1 2 1 1 1 1 1 1 1 ...
## ..- attr(*, "label")= chr "MATH\\AGREE\\TEACHER EXPECTS TO DO"
## ..- attr(*, "format.spss")= chr "F1.0"
## ..- attr(*, "labels")= Named num [1:5] 1 2 3 4 9
## .. ..- attr(*, "names")= chr [1:5] "Agree a lot" "Agree a little" "Disagree a little" "Disagree a lot" ...
## $ BSBM18B : num 1 1 2 1 2 2 1 1 1 1 ...
## ..- attr(*, "label")= chr "MATH\\AGREE\\TEACHER IS EASY TO UNDERSTAND"
## ..- attr(*, "format.spss")= chr "F1.0"
## ..- attr(*, "labels")= Named num [1:5] 1 2 3 4 9
## .. ..- attr(*, "names")= chr [1:5] "Agree a lot" "Agree a little" "Disagree a little" "Disagree a lot" ...
## $ BSBM18C : num 1 3 2 1 2 1 2 1 4 1 ...
## ..- attr(*, "label")= chr "MATH\\AGREE\\INTERESTED IN WHAT TCHR SAYS"
## ..- attr(*, "format.spss")= chr "F1.0"
## ..- attr(*, "labels")= Named num [1:5] 1 2 3 4 9
## .. ..- attr(*, "names")= chr [1:5] "Agree a lot" "Agree a little" "Disagree a little" "Disagree a lot" ...
## $ BSBM18D : num 1 2 3 2 3 1 2 1 4 1 ...
## ..- attr(*, "label")= chr "MATH\\AGREE\\INTERESTING THINGS TO DO"
## ..- attr(*, "format.spss")= chr "F1.0"
## ..- attr(*, "labels")= Named num [1:5] 1 2 3 4 9
## .. ..- attr(*, "names")= chr [1:5] "Agree a lot" "Agree a little" "Disagree a little" "Disagree a lot" ...
## $ BSBM18E : num 1 1 2 1 2 1 1 1 1 1 ...
## ..- attr(*, "label")= chr "MATH\\AGREE\\TEACHER CLEAR ANSWERS"
## ..- attr(*, "format.spss")= chr "F1.0"
## ..- attr(*, "labels")= Named num [1:5] 1 2 3 4 9
## .. ..- attr(*, "names")= chr [1:5] "Agree a lot" "Agree a little" "Disagree a little" "Disagree a lot" ...
## $ BSBM18F : num 1 1 2 1 1 1 1 1 1 1 ...
## ..- attr(*, "label")= chr "MATH\\AGREE\\TEACHER EXPLAINS GOOD"
## ..- attr(*, "format.spss")= chr "F1.0"
## ..- attr(*, "labels")= Named num [1:5] 1 2 3 4 9
## .. ..- attr(*, "names")= chr [1:5] "Agree a lot" "Agree a little" "Disagree a little" "Disagree a lot" ...
## $ BSBM18G : num 1 1 3 2 3 1 1 1 1 2 ...
## ..- attr(*, "label")= chr "MATH\\AGREE\\TEACHER SHOWS LEARNED"
## ..- attr(*, "format.spss")= chr "F1.0"
## ..- attr(*, "labels")= Named num [1:5] 1 2 3 4 9
## .. ..- attr(*, "names")= chr [1:5] "Agree a lot" "Agree a little" "Disagree a little" "Disagree a lot" ...
## $ BSBM18H : num 1 1 1 1 1 1 1 1 1 1 ...
## ..- attr(*, "label")= chr "MATH\\AGREE\\DIFFERENT THINGS TO HELP"
## ..- attr(*, "format.spss")= chr "F1.0"
## ..- attr(*, "labels")= Named num [1:5] 1 2 3 4 9
## .. ..- attr(*, "names")= chr [1:5] "Agree a lot" "Agree a little" "Disagree a little" "Disagree a lot" ...
## $ BSBM18I : num 1 1 1 1 1 1 1 1 1 1 ...
## ..- attr(*, "label")= chr "MATH\\AGREE\\TELLS HOW TO DO BETTER"
## ..- attr(*, "format.spss")= chr "F1.0"
## ..- attr(*, "labels")= Named num [1:5] 1 2 3 4 9
## .. ..- attr(*, "names")= chr [1:5] "Agree a lot" "Agree a little" "Disagree a little" "Disagree a lot" ...
## $ BSBM18J : num 1 1 1 1 1 1 1 1 1 1 ...
## ..- attr(*, "label")= chr "MATH\\AGREE\\TEACHER LISTENS"
## ..- attr(*, "format.spss")= chr "F1.0"
## ..- attr(*, "labels")= Named num [1:5] 1 2 3 4 9
## .. ..- attr(*, "names")= chr [1:5] "Agree a lot" "Agree a little" "Disagree a little" "Disagree a lot" ...
## $ BSBM19A : num 1 1 1 1 1 1 2 1 4 2 ...
## ..- attr(*, "label")= chr "MATH\\AGREE\\USUALLY DO WELL IN MATH"
## ..- attr(*, "format.spss")= chr "F1.0"
## ..- attr(*, "labels")= Named num [1:5] 1 2 3 4 9
## .. ..- attr(*, "names")= chr [1:5] "Agree a lot" "Agree a little" "Disagree a little" "Disagree a lot" ...
## $ BSBM19B : num 4 4 4 4 4 2 2 4 1 3 ...
## ..- attr(*, "label")= chr "MATH\\AGREE\\MATHEMATICS IS MORE DIFFICULT"
## ..- attr(*, "format.spss")= chr "F1.0"
## ..- attr(*, "labels")= Named num [1:5] 1 2 3 4 9
## .. ..- attr(*, "names")= chr [1:5] "Agree a lot" "Agree a little" "Disagree a little" "Disagree a lot" ...
## $ BSBM19C : num 4 4 4 4 2 2 1 4 1 3 ...
## ..- attr(*, "label")= chr "MATH\\AGREE\\MATHEMATICS NOT MY STRENGTH"
## ..- attr(*, "format.spss")= chr "F1.0"
## ..- attr(*, "labels")= Named num [1:5] 1 2 3 4 9
## .. ..- attr(*, "names")= chr [1:5] "Agree a lot" "Agree a little" "Disagree a little" "Disagree a lot" ...
## $ BSBM19D : num 1 1 1 1 2 2 3 1 4 3 ...
## ..- attr(*, "label")= chr "MATH\\AGREE\\LEARN QUICKLY IN MATHEMATICS"
## ..- attr(*, "format.spss")= chr "F1.0"
## ..- attr(*, "labels")= Named num [1:5] 1 2 3 4 9
## .. ..- attr(*, "names")= chr [1:5] "Agree a lot" "Agree a little" "Disagree a little" "Disagree a lot" ...
## $ BSBM19E : num 4 4 4 3 4 1 1 4 1 3 ...
## ..- attr(*, "label")= chr "MATH\\AGREE\\MAT MAKES NERVOUS"
## ..- attr(*, "format.spss")= chr "F1.0"
## ..- attr(*, "labels")= Named num [1:5] 1 2 3 4 9
## .. ..- attr(*, "names")= chr [1:5] "Agree a lot" "Agree a little" "Disagree a little" "Disagree a lot" ...
## $ BSBM19F : num 1 1 1 2 3 1 4 2 4 3 ...
## ..- attr(*, "label")= chr "MATH\\AGREE\\GOOD AT WORKING OUT PROBLEMS"
## ..- attr(*, "format.spss")= chr "F1.0"
## ..- attr(*, "labels")= Named num [1:5] 1 2 3 4 9
## .. ..- attr(*, "names")= chr [1:5] "Agree a lot" "Agree a little" "Disagree a little" "Disagree a lot" ...
## $ BSBM19G : num 2 1 2 1 2 1 4 3 4 3 ...
## ..- attr(*, "label")= chr "MATH\\AGREE\\I AM GOOD AT MATHEMATICS"
## ..- attr(*, "format.spss")= chr "F1.0"
## ..- attr(*, "labels")= Named num [1:5] 1 2 3 4 9
## .. ..- attr(*, "names")= chr [1:5] "Agree a lot" "Agree a little" "Disagree a little" "Disagree a lot" ...
## $ BSBM19H : num 4 4 4 4 3 3 2 4 1 2 ...
## ..- attr(*, "label")= chr "MATH\\AGREE\\MATHEMATICS HARDER FOR ME"
## ..- attr(*, "format.spss")= chr "F1.0"
## ..- attr(*, "labels")= Named num [1:5] 1 2 3 4 9
## .. ..- attr(*, "names")= chr [1:5] "Agree a lot" "Agree a little" "Disagree a little" "Disagree a lot" ...
## $ BSBM19I : num 4 4 4 4 4 2 1 4 1 3 ...
## ..- attr(*, "label")= chr "MATH\\AGREE\\MAT MAKES CONFUSED"
## ..- attr(*, "format.spss")= chr "F1.0"
## ..- attr(*, "labels")= Named num [1:5] 1 2 3 4 9
## .. ..- attr(*, "names")= chr [1:5] "Agree a lot" "Agree a little" "Disagree a little" "Disagree a lot" ...
## $ BSBM20A : num 1 1 1 1 1 1 2 1 1 1 ...
## ..- attr(*, "label")= chr "MATH\\AGREE\\MATHEMATICS WILL HELP ME"
## ..- attr(*, "format.spss")= chr "F1.0"
## ..- attr(*, "labels")= Named num [1:5] 1 2 3 4 9
## .. ..- attr(*, "names")= chr [1:5] "Agree a lot" "Agree a little" "Disagree a little" "Disagree a lot" ...
## $ BSBM20B : num 1 1 1 2 1 1 2 1 1 1 ...
## ..- attr(*, "label")= chr "MATH\\AGREE\\NEED MAT TO LEARN OTHER THINGS"
## ..- attr(*, "format.spss")= chr "F1.0"
## ..- attr(*, "labels")= Named num [1:5] 1 2 3 4 9
## .. ..- attr(*, "names")= chr [1:5] "Agree a lot" "Agree a little" "Disagree a little" "Disagree a lot" ...
## $ BSBM20C : num 1 2 1 3 1 1 1 1 1 1 ...
## ..- attr(*, "label")= chr "MATH\\AGREE\\NEED MATH TO GET INTO <UNI>"
## ..- attr(*, "format.spss")= chr "F1.0"
## ..- attr(*, "labels")= Named num [1:5] 1 2 3 4 9
## .. ..- attr(*, "names")= chr [1:5] "Agree a lot" "Agree a little" "Disagree a little" "Disagree a lot" ...
## $ BSBM20D : num 1 1 1 3 1 1 2 1 1 1 ...
## ..- attr(*, "label")= chr "MATH\\AGREE\\NEED MAT TO GET THE JOB I WANT"
## ..- attr(*, "format.spss")= chr "F1.0"
## ..- attr(*, "labels")= Named num [1:5] 1 2 3 4 9
## .. ..- attr(*, "names")= chr [1:5] "Agree a lot" "Agree a little" "Disagree a little" "Disagree a lot" ...
## $ BSBM20E : num 1 1 1 2 4 1 4 2 1 2 ...
## ..- attr(*, "label")= chr "MATH\\AGREE\\JOB INVOLVING MATHEMATICS"
## ..- attr(*, "format.spss")= chr "F1.0"
## ..- attr(*, "labels")= Named num [1:5] 1 2 3 4 9
## .. ..- attr(*, "names")= chr [1:5] "Agree a lot" "Agree a little" "Disagree a little" "Disagree a lot" ...
## $ BSBM20F : num 1 1 1 1 1 1 2 2 1 1 ...
## ..- attr(*, "label")= chr "MATH\\AGREE\\GET AHEAD IN THE WORLD"
## ..- attr(*, "format.spss")= chr "F1.0"
## ..- attr(*, "labels")= Named num [1:5] 1 2 3 4 9
## .. ..- attr(*, "names")= chr [1:5] "Agree a lot" "Agree a little" "Disagree a little" "Disagree a lot" ...
## $ BSBM20G : num 1 1 1 2 1 1 2 1 1 1 ...
## ..- attr(*, "label")= chr "MATH\\AGREE\\MORE JOB OPPORTUNITIES"
## ..- attr(*, "format.spss")= chr "F1.0"
## ..- attr(*, "labels")= Named num [1:5] 1 2 3 4 9
## .. ..- attr(*, "names")= chr [1:5] "Agree a lot" "Agree a little" "Disagree a little" "Disagree a lot" ...
## $ BSBM20H : num 1 1 1 1 1 1 1 1 1 1 ...
## ..- attr(*, "label")= chr "MATH\\AGREE\\PARENTS THINK MATH IMPORTANT"
## ..- attr(*, "format.spss")= chr "F1.0"
## ..- attr(*, "labels")= Named num [1:5] 1 2 3 4 9
## .. ..- attr(*, "names")= chr [1:5] "Agree a lot" "Agree a little" "Disagree a little" "Disagree a lot" ...
## $ BSBM20I : num 1 1 1 2 1 1 2 1 1 1 ...
## ..- attr(*, "label")= chr "MATH\\AGREE\\IMPORTANT TO DO WELL IN MATH"
## ..- attr(*, "format.spss")= chr "F1.0"
## ..- attr(*, "labels")= Named num [1:5] 1 2 3 4 9
## .. ..- attr(*, "names")= chr [1:5] "Agree a lot" "Agree a little" "Disagree a little" "Disagree a lot" ...
## $ BSBS21A : num 1 4 2 2 1 1 3 2 1 1 ...
## ..- attr(*, "label")= chr "SCI\\AGREE\\ENJOY LEARNING SCIENCE"
## ..- attr(*, "format.spss")= chr "F1.0"
## ..- attr(*, "labels")= Named num [1:5] 1 2 3 4 9
## .. ..- attr(*, "names")= chr [1:5] "Agree a lot" "Agree a little" "Disagree a little" "Disagree a lot" ...
## $ BSBS21B : num 2 3 3 3 2 2 3 4 1 4 ...
## ..- attr(*, "label")= chr "SCI\\AGREE\\WISH HAVE NOT TO STUDY SCIENCE"
## ..- attr(*, "format.spss")= chr "F1.0"
## ..- attr(*, "labels")= Named num [1:5] 1 2 3 4 9
## .. ..- attr(*, "names")= chr [1:5] "Agree a lot" "Agree a little" "Disagree a little" "Disagree a lot" ...
## $ BSBS21C : num 1 1 3 3 4 4 1 2 1 4 ...
## ..- attr(*, "label")= chr "SCI\\AGREE\\SCIENCE IS BORING"
## ..- attr(*, "format.spss")= chr "F1.0"
## ..- attr(*, "labels")= Named num [1:5] 1 2 3 4 9
## .. ..- attr(*, "names")= chr [1:5] "Agree a lot" "Agree a little" "Disagree a little" "Disagree a lot" ...
## $ BSBS21D : num 2 3 2 1 1 1 1 1 1 2 ...
## ..- attr(*, "label")= chr "SCI\\AGREE\\LEARN INTERESTING THINGS"
## ..- attr(*, "format.spss")= chr "F1.0"
## ..- attr(*, "labels")= Named num [1:5] 1 2 3 4 9
## .. ..- attr(*, "names")= chr [1:5] "Agree a lot" "Agree a little" "Disagree a little" "Disagree a lot" ...
## [list output truncated]
typeof(mydata)## [1] "list"
class(mydata)## [1] "data.frame"
dim(mydata) # alternatively, use `nrow()` and `ncol()`## [1] 10221 436
length(mydata) # number of variables in a data frame; information output by`length()` function depends on the data structure## [1] 436
names(mydata) # list variable names## [1] "IDCNTRY" "IDBOOK" "IDSCHOOL" "IDCLASS" "IDSTUD" "IDGRADE" "ITSEX" "ITADMINI" "ITLANG" "BSBG01" "BSBG03"
## [12] "BSBG04" "BSBG05" "BSBG06A" "BSBG06B" "BSBG06C" "BSBG06D" "BSBG06E" "BSBG06F" "BSBG06G" "BSBG06H" "BSBG06I"
## [23] "BSBG06J" "BSBG06K" "BSBG07A" "BSBG07B" "BSBG08" "BSBG09A" "BSBG09B" "BSBG10A" "BSBG10B" "BSBG11" "BSBG12"
## [34] "BSBG13A" "BSBG13B" "BSBG13C" "BSBG14A" "BSBG14B" "BSBG14C" "BSBG14D" "BSBG14E" "BSBG14F" "BSBG15A" "BSBG15B"
## [45] "BSBG15C" "BSBG15D" "BSBG15E" "BSBG15F" "BSBG15G" "BSBG16A" "BSBG16B" "BSBG16C" "BSBG16D" "BSBG16E" "BSBG16F"
## [56] "BSBG16G" "BSBG16H" "BSBG16I" "BSBM17A" "BSBM17B" "BSBM17C" "BSBM17D" "BSBM17E" "BSBM17F" "BSBM17G" "BSBM17H"
## [67] "BSBM17I" "BSBM18A" "BSBM18B" "BSBM18C" "BSBM18D" "BSBM18E" "BSBM18F" "BSBM18G" "BSBM18H" "BSBM18I" "BSBM18J"
## [78] "BSBM19A" "BSBM19B" "BSBM19C" "BSBM19D" "BSBM19E" "BSBM19F" "BSBM19G" "BSBM19H" "BSBM19I" "BSBM20A" "BSBM20B"
## [89] "BSBM20C" "BSBM20D" "BSBM20E" "BSBM20F" "BSBM20G" "BSBM20H" "BSBM20I" "BSBS21A" "BSBS21B" "BSBS21C" "BSBS21D"
## [100] "BSBS21E" "BSBS21F" "BSBS21G" "BSBS21H" "BSBS21I" "BSBS22A" "BSBS22B" "BSBS22C" "BSBS22D" "BSBS22E" "BSBS22F"
## [111] "BSBS22G" "BSBS22H" "BSBS22I" "BSBS22J" "BSBS23A" "BSBS23B" "BSBS23C" "BSBS23D" "BSBS23E" "BSBS23F" "BSBS23G"
## [122] "BSBS23H" "BSBS24A" "BSBS24B" "BSBS24C" "BSBS24D" "BSBS24E" "BSBS24F" "BSBS24G" "BSBS24H" "BSBS24I" "BSBM25AA"
## [133] "BSBS25AB" "BSBM25BA" "BSBS25BB" "BSBM26AA" "BSBS26AB" "BSBM26BA" "BSBS26BB" "BSBB21" "BSBB22A" "BSBB22B" "BSBB22C"
## [144] "BSBB22D" "BSBB22E" "BSBB22F" "BSBB22G" "BSBB22H" "BSBB22I" "BSBB23A" "BSBB23B" "BSBB23C" "BSBB23D" "BSBB23E"
## [155] "BSBB23F" "BSBB23G" "BSBB23H" "BSBB23I" "BSBB23J" "BSBB24A" "BSBB24B" "BSBB24C" "BSBB24D" "BSBB24E" "BSBB24F"
## [166] "BSBB24G" "BSBB24H" "BSBE25" "BSBE26A" "BSBE26B" "BSBE26C" "BSBE26D" "BSBE26E" "BSBE26F" "BSBE26G" "BSBE26H"
## [177] "BSBE26I" "BSBE27A" "BSBE27B" "BSBE27C" "BSBE27D" "BSBE27E" "BSBE27F" "BSBE27G" "BSBE27H" "BSBE27I" "BSBE27J"
## [188] "BSBE28A" "BSBE28B" "BSBE28C" "BSBE28D" "BSBE28E" "BSBE28F" "BSBE28G" "BSBE28H" "BSBC29" "BSBC30A" "BSBC30B"
## [199] "BSBC30C" "BSBC30D" "BSBC30E" "BSBC30F" "BSBC30G" "BSBC30H" "BSBC30I" "BSBC31A" "BSBC31B" "BSBC31C" "BSBC31D"
## [210] "BSBC31E" "BSBC31F" "BSBC31G" "BSBC31H" "BSBC31I" "BSBC31J" "BSBC32A" "BSBC32B" "BSBC32C" "BSBC32D" "BSBC32E"
## [221] "BSBC32F" "BSBC32G" "BSBC32H" "BSBP33" "BSBP34A" "BSBP34B" "BSBP34C" "BSBP34D" "BSBP34E" "BSBP34F" "BSBP34G"
## [232] "BSBP34H" "BSBP34I" "BSBP35A" "BSBP35B" "BSBP35C" "BSBP35D" "BSBP35E" "BSBP35F" "BSBP35G" "BSBP35H" "BSBP35I"
## [243] "BSBP35J" "BSBP36A" "BSBP36B" "BSBP36C" "BSBP36D" "BSBP36E" "BSBP36F" "BSBP36G" "BSBP36H" "BSBS37A" "BSBS37B"
## [254] "BSBS37C" "BSBS37D" "BSBS37E" "BSBS37F" "BSBS37G" "BSBS37H" "BSBS37I" "BSBM38AA" "BSBB38AB" "BSBE38AC" "BSBC38AD"
## [265] "BSBP38AE" "BSBM38BA" "BSBB38BB" "BSBE38BC" "BSBC38BD" "BSBP38BE" "BSBM39AA" "BSBS39AB" "BSBM39BA" "BSBS39BB" "ITACCOMM1"
## [276] "IDPOP" "IDGRADER" "BSDAGE" "TOTWGT" "HOUWGT" "SENWGT" "WGTADJ1" "WGTADJ2" "WGTADJ3" "WGTFAC1" "WGTFAC2"
## [287] "WGTFAC3" "JKZONE" "JKREP" "BSMMAT01" "BSMMAT02" "BSMMAT03" "BSMMAT04" "BSMMAT05" "BSSSCI01" "BSSSCI02" "BSSSCI03"
## [298] "BSSSCI04" "BSSSCI05" "BSMALG01" "BSMALG02" "BSMALG03" "BSMALG04" "BSMALG05" "BSMDAT01" "BSMDAT02" "BSMDAT03" "BSMDAT04"
## [309] "BSMDAT05" "BSMNUM01" "BSMNUM02" "BSMNUM03" "BSMNUM04" "BSMNUM05" "BSMGEO01" "BSMGEO02" "BSMGEO03" "BSMGEO04" "BSMGEO05"
## [320] "BSSCHE01" "BSSCHE02" "BSSCHE03" "BSSCHE04" "BSSCHE05" "BSSEAR01" "BSSEAR02" "BSSEAR03" "BSSEAR04" "BSSEAR05" "BSSBIO01"
## [331] "BSSBIO02" "BSSBIO03" "BSSBIO04" "BSSBIO05" "BSSPHY01" "BSSPHY02" "BSSPHY03" "BSSPHY04" "BSSPHY05" "BSMKNO01" "BSMKNO02"
## [342] "BSMKNO03" "BSMKNO04" "BSMKNO05" "BSMAPP01" "BSMAPP02" "BSMAPP03" "BSMAPP04" "BSMAPP05" "BSMREA01" "BSMREA02" "BSMREA03"
## [353] "BSMREA04" "BSMREA05" "BSSKNO01" "BSSKNO02" "BSSKNO03" "BSSKNO04" "BSSKNO05" "BSSAPP01" "BSSAPP02" "BSSAPP03" "BSSAPP04"
## [364] "BSSAPP05" "BSSREA01" "BSSREA02" "BSSREA03" "BSSREA04" "BSSREA05" "BSMIBM01" "BSMIBM02" "BSMIBM03" "BSMIBM04" "BSMIBM05"
## [375] "BSSIBM01" "BSSIBM02" "BSSIBM03" "BSSIBM04" "BSSIBM05" "BSBGHER" "BSDGHER" "BSBGSSB" "BSDGSSB" "BSBGSB" "BSDGSB"
## [386] "BSBGSLM" "BSDGSLM" "BSBGEML" "BSDGEML" "BSBGSCM" "BSDGSCM" "BSBGSVM" "BSDGSVM" "BSBGSLS" "BSDGSLS" "BSBGESL"
## [397] "BSDGESL" "BSBGSCS" "BSDGSCS" "BSBGSVS" "BSDGSVS" "BSBGSLB" "BSDGSLB" "BSBGEBL" "BSDGEBL" "BSBGSCB" "BSDGSCB"
## [408] "BSBGSLE" "BSDGSLE" "BSBGEEL" "BSDGEEL" "BSBGSCE" "BSDGSCE" "BSBGSLC" "BSDGSLC" "BSBGECL" "BSDGECL" "BSBGSCC"
## [419] "BSDGSCC" "BSBGSLP" "BSDGSLP" "BSBGEPL" "BSDGEPL" "BSBGSCP" "BSDGSCP" "BSDG06S" "BSDGEDUP" "BSDMLOWP" "BSDSLOWP"
## [430] "BSDMWKHW" "BSDSWKHS" "BSDBWKHB" "BSDCWKHC" "BSDPWKHP" "BSDEWKHE" "VERSION"
Field, Miles, and Field (2012) uses R Commander - a graphical user interface to R. We will not use it.↩︎
The example data is the USA student dataset from TIMSS 2015.↩︎