I was wondering if someone can help me understand lists.
I have a table that I need to convert to a list. There are 2 columns and 2 observations.
Column 1 is "Names" and Column 2 is "Classes".
For the first observation:
Column1/Row1 is "James", and Column2/Row1 is "Math, Physics, Chemistry".
Here's my code:
If someone asks me to make a list, is this how I do it? Am I suppose to be able to extract individual courses out of this list? if so, I can't seem to do it.
I have a table that I need to convert to a list. There are 2 columns and 2 observations.
Column 1 is "Names" and Column 2 is "Classes".
For the first observation:
Column1/Row1 is "James", and Column2/Row1 is "Math, Physics, Chemistry".
Here's my code:
Code:
a <-list(name = "James", Courses = c("Math", "Physics", "Chemistry"))
b <- list (name = "Peter", Courses = c("English", "History", "Sociology"))
Student_Data = list(a,b)