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

 # ============================================================================== ## Factor # ============================================================================== # Create speed_vector speed_vector 4.

# ============================================================================== ## 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

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!