── Conflicts ────────────────────────────────────────── tidyverse_conflicts() ──
✖ dplyr::filter() masks stats::filter()
✖ dplyr::lag() masks stats::lag()
ℹ Use the conflicted package (<http://conflicted.r-lib.org/>) to force all conflicts to become errors
library(viridis)
Loading required package: viridisLite
library(scales)
Attaching package: 'scales'
The following object is masked from 'package:viridis':
viridis_pal
The following object is masked from 'package:purrr':
discard
The following object is masked from 'package:readr':
col_factor
#data wrangling specific for grade datastudent_data <- student_data |>#pivot longer to have one grade per rowpivot_longer(cols =c(first_period_grade, second_period_grade, final_grade),names_to ="period",values_to ="score") |>#refine the period names, convert educational support indicators to text.mutate(period =recode(period, 'first_period_grade'='first period','second_period_grade'='second period', 'final_grade'='final'),extra_educational_support =recode(extra_educational_support, "no"="no school support", "yes"="school support"),family_educational_support =recode(family_educational_support, "no"="no family support", "yes"="family support")) |>#rearrange the sequence of the periodsmutate(period =fct_relevel(period, 'first period' ,'second period', 'final'))