write code for r programming

Get perfect grades by consistently using our writing services. Place your order and get a quality paper today. Take advantage of our current 20% discount by using the coupon code GET20


Order a Similar Paper Order a Different Paper

1. Create a vector that will hold the following values: 3,4,7,9, and 15.

2. Create a vector that will hold the following values: 10, 12.5, 15, …, 50.

3. Use an R function to find how many elements the above vectors has.

4. Use a for loop command to create a vector that would hold the third root of the numbers: 7,15,85,113,245, and 523.

5. Create the following Matrix in R

M = { 50 837 970

47 877 230

31 25 415

35 144 2356

45 300 556 }

6. Use an R command to find the dimension of the matrix M above.

7. Use an R command to extract the elements on the 3rd row of the matrix M

8. Write a user-defined function that will take as arguments 3 numbers and returns the sum of the square roots of the 3 numbers.

9. Write a ”for loop” that will compute the sum of the elements of each row of matrix M above. Store the row-sums in a new vector called ”rsums”.

10. On BB you will find a file called ”FevData.csv”. The file contains data on several children on a study examining the Forced Expiratory Volume (FEV) after working out for 30 mins.

(a) Read the file into R and store the data into an R object using an appropriate name.

(b) Use an R command to find the names of the variables in your file.

(c) Use an R command to find how many children participated in the study.

(d) Use an R command to find the average age of the participants.

11. On BB you will find a file called ”Ischemic.xlsx”. The file provides a data set from one health insurance company regarding the total costs for services provided to a number of subscribers with ischemic (coronary) heart disease during 1998 and 1999.

(a) Read the file into R and store the data into an R object using an appropriate name. (Do not convert the file to any other type of documents before reading it.

(b) Use an R command to check the top 6 rows of the data.

(c) Use an R command to find the names of the variables in your file.

(d) Use an R command to find the number of variables recorded in the study.

(e) Use an R command to find how many people participated in the study


Do you need help with this or a different assignment? We offer CONFIDENTIAL, ORIGINAL (Turnitin/LopesWrite/SafeAssign checks), and PRIVATE services using latest (within 5 years) peer-reviewed articles. Kindly click on ORDER NOW to receive an excellent paper from our writers.

Get a 15% discount on your order using the following coupon code SAVE15


Order a Similar Paper Order a Different Paper