Load Libary

library(tidyverse)
## ── Attaching packages ─────────────────────────────────────── tidyverse 1.3.2 ──
## ✔ ggplot2 3.3.6      ✔ purrr   0.3.5 
## ✔ tibble  3.1.8      ✔ dplyr   1.0.10
## ✔ tidyr   1.2.1      ✔ stringr 1.4.1 
## ✔ readr   2.1.3      ✔ forcats 0.5.2 
## ── Conflicts ────────────────────────────────────────── tidyverse_conflicts() ──
## ✖ dplyr::filter() masks stats::filter()
## ✖ dplyr::lag()    masks stats::lag()
getwd()
## [1] "C:/Users/Mitcheyla$/Desktop/DATA 101, Fall Semester"
setwd("C:/Users/Mitcheyla$/Desktop/DATA 101, Fall Semester")

Import the dataset

library(readxl)
Class_MnM_Data_1_ <- read_excel("Class MnM Data(1).xlsx")

Look at the first 6 rows of the data

head(Class_MnM_Data_1_)
## # A tibble: 6 × 6
##   student_id    id color defect total weight_grams
##   <chr>      <dbl> <chr> <chr>  <dbl>        <dbl>
## 1 AP_LV          1 r     c         27           40
## 2 AP_LV          2 r     l         27           40
## 3 AP_LV          3 r     z         27           40
## 4 AP_LV          4 r     z         27           40
## 5 AP_LV          5 r     z         27           40
## 6 AP_LV          6 o     l         27           40

Look at the dimension of the data

dim(Class_MnM_Data_1_)
## [1] 382   6

Summarize the data

summary(Class_MnM_Data_1_)
##   student_id              id          color              defect         
##  Length:382         Min.   : 1.0   Length:382         Length:382        
##  Class :character   1st Qu.:10.0   Class :character   Class :character  
##  Mode  :character   Median :20.0   Mode  :character   Mode  :character  
##                     Mean   :22.8                                        
##                     3rd Qu.:35.0                                        
##                     Max.   :55.0                                        
##      total        weight_grams  
##  Min.   :18.00   Min.   :25.00  
##  1st Qu.:27.00   1st Qu.:40.00  
##  Median :54.00   Median :48.00  
##  Mean   :45.01   Mean   :44.25  
##  3rd Qu.:55.00   3rd Qu.:50.00  
##  Max.   :56.00   Max.   :50.00
glimpse(Class_MnM_Data_1_)
## Rows: 382
## Columns: 6
## $ student_id   <chr> "AP_LV", "AP_LV", "AP_LV", "AP_LV", "AP_LV", "AP_LV", "AP…
## $ id           <dbl> 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17…
## $ color        <chr> "r", "r", "r", "r", "r", "o", "o", "o", "o", "o", "y", "y…
## $ defect       <chr> "c", "l", "z", "z", "z", "l", "z", "z", "z", "z", "z", "z…
## $ total        <dbl> 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 2…
## $ weight_grams <dbl> 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 4…

Assign the dataset to a new variable

data1 <- Class_MnM_Data_1_

See the structure of the data

str(data1)
## tibble [382 × 6] (S3: tbl_df/tbl/data.frame)
##  $ student_id  : chr [1:382] "AP_LV" "AP_LV" "AP_LV" "AP_LV" ...
##  $ id          : num [1:382] 1 2 3 4 5 6 7 8 9 10 ...
##  $ color       : chr [1:382] "r" "r" "r" "r" ...
##  $ defect      : chr [1:382] "c" "l" "z" "z" ...
##  $ total       : num [1:382] 27 27 27 27 27 27 27 27 27 27 ...
##  $ weight_grams: num [1:382] 40 40 40 40 40 40 40 40 40 40 ...