Question: Please answer using Rstudio One diabetic patient measures his blood glucose level every morning, and the readings in the past week are as follows: Sunday

Please answer using Rstudio

One diabetic patient measures his blood glucose level every morning, and the readings in the past week are as follows: Sunday Monday Tuesday Wednesday Thursday Friday Saturday 170 186 180 195 169 157 179 First of all, write an R program to put all the 7 glucose levels (not the days of the week) in a vector. Then, solve the following two problems: R provides a function named mean() to calculate the mean value of a numeric vector. Use this function to calculate the average blood glucose level of this patient in the past week. (Search for examples of how to use this function if needed) The glucose levels above are measured in mg/dL (milligrams per deciliter), but the patient also wants to know the levels measured in mmol/L (millimoles per liter). We know that 1 mmol/L = 18 mg/dL. Write an R code to convert all the daily glucose levels from mg/dL to mmol/L and put the results in a new 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!