From 72ae9f4355efbfa34f750b3ebc3e6132aef3410c Mon Sep 17 00:00:00 2001 From: Jessica Temporal Date: Thu, 15 Oct 2015 13:59:54 -0300 Subject: [PATCH] Created named list (with the year) just added a line with the same named list object being created with the year of the movie. --- datacamp/intro/lists.R | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) 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,]