Answered step by step
Verified Expert Solution
Link Copied!
Question
1 Approved Answer

Create a list named myList with the following four elements (with their names): 1. numbers: The even numbers from -30 to 30. 2. strings: Five

Create a list named myList with the following four elements (with their names): 1. numbers: The even numbers from -30 to 30. 2. strings: Five character strings a,b,c,d,e. 3. matrix: One 2x3 matrix 5 3 1 8 4 6 . 4. logical: Two logical values TRUE and FALSE. Print the sum of the numbers. Change the value of the last element of the strings as k. Change the matrix with its transpose. Remove logical from the list. Print the list. c. (15 pts) Monday Tuesday Wednesday Thursday Friday Week1 325 337 465 192 332 Week2 199 389 513 312 298 Week3 244 399 336 217 287 Store the daily sales of a product (given above) for three weeks in a matrix object. Assign the row names and column names as given in the table above. Compute and print the average sales of each week (row) and average sales of each day (column). Insert the sales on the weekend to the matrix using cbind function. Saturday Sunday Week1 262 229 Week2 223 148 Week3 412 403 Print the sales of Week1 and Week3 on Tuesday, Thursday, and Saturday as a submatrix.

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_2

Step: 3

blur-text-image_3

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

Advances In Databases And Information Systems 22nd European Conference Adbis 2018 Budapest Hungary September 2 5 2018 Proceedings Lncs 11019

Authors: Andras Benczur ,Bernhard Thalheim ,Tomas Horvath

1st Edition

3319983970, 978-3319983974

More Books

Students explore these related Databases questions