Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions datacamp/intro/lists.R
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,8 @@ reviews <- data.frame(scores, sources, comments)
shining.list <- list(moviename = "The Shining", actors = actors, reviews = reviews)

# We forgot something: Add the year to shining.list ! Add your code below:

# Create named list (with the year of the movie)
shining.list <- list(moviename = "The Shining", year = 1980, actors = actors, reviews = reviews)

# Have a look at shining.list. Remember str()?
str(shining.list)
Expand All @@ -33,4 +34,4 @@ c(shining.list, year=1980)

# Select from the shining.list:
last.actor <- shining.list[[2]][5]
second.review <- shining.list$reviews[2,]
second.review <- shining.list$reviews[2,]