Basics of R Programming Final Assignment - IT Computer Science Assignment Help
Assignment Task
Q1: Consider the table given below:
A) Create a dataframe from the above table
B) Extract 3rd and 5th row with 2nd and 4th column from the dataframe
C) Add the following column in the above dataframe
D). Find out the average salary and volatility in the salary of the employees.
E). Find out the difference in the time span of the employee who started first and who started last.
Q2. Consider the data given:
A). Create the vectors for the above data
B). Create the data frame for the above dataset.
C). Test if the gender column is a factor
D). Print the gender column so see the levels
E). Generate three factor levels having two repetitions and label them “Rich”, “Poor”
Q3. Consider the two vectors of different lengths and do the following:
A). Create 2 rectangular matrices each with 3 rows and 3 columns
B). Give names to all columns, rows and matrices
C). Print the third row of the second matrix of the array
D). Print the element in the 1st row and 3rd column of the 1st matrix.
E). Print the 2nd Matrix
F). Calculate the sum of the rows across all the matrices
Q4. Using data from mtcars dataset in R, answer the following:
A). Find out the difference in the weight of heaviest car and least heavy car.
B). Find out the number of cars with 3 forward gears.
C). Calculate the mean mpg of cars with automatic transmission.
D). Calculate the mean weight of cars with horsepower greater than 100.
E). Find out the average horsepower of cars with V-shaped engines.
Q5.
Part 1: For this exercise, we’ll use the (built-in) dataset VADeaths.
(A) Make sure the object is a data frame, if not change it to a data frame.
(B) Create a new variable, named Total, which is the sum of each row.
(C) Change the order of the columns so “Total” (created above) is the first variable
Part 2: For this exercise we’ll use the (built-in) dataset state.x77.
(A) Make sure the object is a data frame, if not change it to a data frame.
(B) Find out how many states have an income of less than 4300.
(C) Find out which is the state with the highest income
Q6: Create a data frame with the datasets state.abb, state.area, state.division, state.region. The row names should be the names of the states (state.name)
(A) Add the previous data frame column-wise to state.x77
(B) Remove the variable div.
(C) Also remove the variables Life Exp, HS Grad, Frost, abb, and are.
(D) Add a variable to the data frame which should categorize the level of illiteracy: [0,1) is low, [1,2) is some, [2, inf) is high.
(E) Find out which state from the west, with low illiteracy, has the highest income, and what that income is.
This IT Computer Science Assignment has been solved by our IT Computer Science Experts at TheTVAH.
Our Assignment Writing Experts are efficient to provide a fresh solution to this question.
We are serving more than 10000+ Students in Australia, UK & US by helping them to score HD in their academics.
Our Experts are well trained to follow all marking rubrics & referencing Style.
Be it a used or new solution, the quality of the work submitted by our assignment experts remains unhampered.
You may continue to expect the same or even better quality with the used and new assignment solution files respectively.
There’s one thing to be noticed that you could choose one between the two and acquire an HD either way.
You could choose a new assignment solution file to get yourself an exclusive, plagiarism (with free Turn tin file), expert quality assignment or order an old solution file that was considered worthy of the highest distinction.