The document defines a list called shining_list and then extends it by adding the year 1980 and director "Stanley Kubrick" to create a new list called shining_list_ext. It then uses the str() function to view the structure of the new extended list, confirming it now contains the original elements plus the added year and director fields.
The document defines a list called shining_list and then extends it by adding the year 1980 and director "Stanley Kubrick" to create a new list called shining_list_ext. It then uses the str() function to view the structure of the new extended list, confirming it now contains the original elements plus the added year and director fields.
The document defines a list called shining_list and then extends it by adding the year 1980 and director "Stanley Kubrick" to create a new list called shining_list_ext. It then uses the str() function to view the structure of the new extended list, confirming it now contains the original elements plus the added year and director fields.
The document defines a list called shining_list and then extends it by adding the year 1980 and director "Stanley Kubrick" to create a new list called shining_list_ext. It then uses the str() function to view the structure of the new extended list, confirming it now contains the original elements plus the added year and director fields.
# Have a look at the structure of shining_list_ext
str(shining_list_ext)
shining_list is already defined in the workspace
> > # Add both the year and director to shining_list: shining_list_ext > shining_list_ext<- c(shining_list, year= 1980, director= "Stanley Kubrick") > > # Have a look at the structure of shining_list_ext > str(shining_list_ext) List of 5 $ title : chr "The Shining" $ actors : chr [1:5] "Jack Nicholson" "Shelley Duvall" "Danny Lloyd" "Scatman Crothers" ... $ reviews : Ord.factor w/ 4 levels "Bad"<"OK"<"Good"<..: 3 2 3 4 1 4 3 $ year