Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

# ============================================================================== ## Factor # ============================================================================== # Create speed_vector speed_vector 4. Matrix Copy and Paste the Star Wars code above into your R and complete

image text in transcribed

# ============================================================================== ## Factor # ==============================================================================

# Create speed_vector

speed_vector

4. Matrix Copy and Paste the Star Wars code above into your R and complete the problem 4. (a) Use c(new_hope, empire_strikes, return_jedi) to combine the three vectors into one vector. Call this vector box_office. (b) Construct a matrix with 3 rows, where each row represents a movie. Name the resulting matrix star wars_matrix. (c) Use the function rowSums() to calculate worldwide box office figures. Name the vector worldwide_vector. (d) Use colnames() to name the columns of star wars_matrix with the regionvector, and use rownames () to name the rows of star_wars_matrix with the titles vector. Then print out star_wars_matrix. (e) Add worldwide_vector as a new column to the star wars_matrix and assign the result to all_wars_matrix. Print out all_wars_matrix Use the cbind() function. (f) Select the non-US revenue for first two movies. ## Factor # Create speed_vector speed_vector

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

PostgreSQL Up And Running A Practical Guide To The Advanced Open Source Database

Authors: Regina Obe, Leo Hsu

3rd Edition

1491963417, 978-1491963418

More Books

Students also viewed these Databases questions

Question

Contrast the two models of social responsibility.

Answered: 1 week ago