Question: Note: Please show your code as well as the output. Thank you! Write a R code to do each of the following tasks (individually) :
Write a R code to do each of the following tasks (individually) : a. (5 points) Create a sequence of numbers from 25 to 60 and print their average. b. (10 points) Create a vector which contains 10 random integer values between -20 and +20 and display the sum of only the negative numbers among them. c. (10 points) Create four vectors a,b,c,d with 3 integers each. Combine the vectors to form a matrix where each column represents a vector. Print the size of the matrix as well as its contents. d. (10 points) Create a Dataframe to contains at least 4 details of 5 employees. Name each row with the employee's last name. Print the contents of the Datafame as well as its dimensions. e. (15 points) Define a function to add to find common elements from two vectors and return the result as a third vector. Test your function using at least three different sample inputs
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
