Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

# Use the table from the exercise to define the comments and scores vectors scores < - c ( 4 . 6 , 5 ,

# Use the table from the exercise to define the comments and scores vectors
scores <- c(4.6,5,4.8,5,4.2)
comments <- list("I would watch it again","Amazing!","I liked it","One of the best movies","Fascinating plot")
# Save the average of the scores vector as avg_review
avg_review<-mean(scores)
# Combine scores and comments into the reviews_df data frame
reviews_df<- data.frame(scores,comments)
# Create and print out a list, called departed_list
departed_list<-list(title="The Departed",actors=movie_actors,reviews=reviews_df,average_review=avg_review)
print(departed_list)

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Database Technology And Management Computers And Information Processing Systems For Business

Authors: Robert C. Goldstein

1st Edition

0471887374, 978-0471887379

More Books

Students also viewed these Databases questions