Once you run esaj::cjsg_table("subjects"), you can use this function to gather the subjects automatically. Download esaj by running devtools::install_github("courtsbr/esaj").

gather_subjects(subjects)

Arguments

subjects

Table returned by esaj::cjsg_table("subjects")