diff --git a/datacamp/intro/lists.R b/datacamp/intro/lists.R index 5721e2e..df3d1ea 100644 --- a/datacamp/intro/lists.R +++ b/datacamp/intro/lists.R @@ -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) @@ -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,] \ No newline at end of file +second.review <- shining.list$reviews[2,]