4.2 A first look at your data

You can use the names() function to see a list of variables (names and column number) in your data frame.

Use the head() function to preview the first rows of a data frame.

To view the entire data frame, either click on the object in the “Data” window or use View().

  names(dcps)  # identify variable names
## [1] "SchCode"     "SchName"     "SchType"     "NumTested"   "ProfLang"   
## [6] "ProfMath"    "DataVERSION"
  head(dcps)   # see the first few rows of data
## # A tibble: 6 × 7
##   SchCode SchName                SchType NumTested ProfLang ProfMath DataVERSION
##     <dbl> <chr>                  <fct>       <dbl>    <dbl>    <dbl> <chr>      
## 1     202 Aiton Elementary Scho… Elemen…        72     5.56   15.3   DC PARCC 2…
## 2     203 Amidon-Bowen Elementa… Elemen…       147    16.3    10.1   DC PARCC 2…
## 3     450 Anacostia High School  High           67     4.48    1.43  DC PARCC 2…
## 4     452 Ballou High School     High          180     2.78    0.498 DC PARCC 2…
## 5     204 Bancroft Elementary S… Elemen…       213    34.3    39.9   DC PARCC 2…
## 6     205 Barnard Elementary Sc… Elemen…       224    38.4    39.7   DC PARCC 2…