Creating a named list (2)
Being a huge movie fan (remember your job at LucasFilms), you decide to start storing information on good movies with the help of lists.
Start by creating a list for the movie "The Shining". We have already created the variables mov
, act
and rev
in your R workspace. Feel free to check them out in the console.
This exercise is part of the course
Introduction to R
Exercise instructions
Complete the code in the editor to create shining_list
; it contains three elements:
moviename
: a character string with the movie title (stored inmov
)actors
: a vector with the main actors' names (stored inact
)reviews
: a data frame that contains some reviews (stored inrev
)
Do not forget to name the list components accordingly (names are moviename
, actors
and reviews
).
Hands-on interactive exercise
Have a go at this exercise by completing this sample code.
# The variables mov, act and rev are available
# Finish the code to build shining_list
shining_list <- list(moviename = mov)