Question: *For problem 3, 4 and 5, we will use the `Pima.tr` data set in R.* `Pima.tr` contains a randomly selected set of 200 subjects collected

*For problem 3, 4 and 5, we will use the `Pima.tr` data set in R.*

`Pima.tr` contains a randomly selected set of 200 subjects collected by the US National Institute of Diabetes and Digestive and Kidney Diseases. A population of women who were at least 21 years old, of Pima Indian heritage and living near Phoenix, Arizona, was tested for diabetes according to World Health Organization criteria.

* npreg: number of pregnancies. * glu: plasma glucose concentration in an oral glucose tolerance test. * bp: diastolic blood pressure (mm Hg). * skin: triceps skin fold thickness (mm). * bmi: body mass index (weight in kg/(height in m) * ped: diabetes pedigree function. * age: age in years. * type: Yes or No, for diabetic according to WHO criteria.

```{r} # Make sure you have the "MASS" package installed library(MASS) View(Pima.tr) data(Pima.tr) ```

# 3. (20 points)

Use `with()` and `table()` function to display a frequency table for `age` and `type` that counts the number of records at each level.

```{r} # Your code ```

Use `tapply()` to show the average blood pressure `bp` by `type`.

```{r} # Your code ```

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!