# stat 540 hw

1. Use R to answer the following questions. Before beginning, load the necessary data sets by
entering the following commands:
> data(iris)
> data(islands)
> data(mtcars)
Directions for problem 1: When I ask you below “what type of object is ______”, answer with
one of the following:
vector, factor, matrix, data frame, list, or function
Be as specific as possible; for example, all matrices are arrays, but not all arrays are matrices.
So, if ______ is in fact a matrix, calling it an array is not a full credit answer. Also, a data frame
is a special case of a list, so if ________ is a data frame, calling it a list is not a full credit answer.
Note: If ________ is a vector or matrix, give me the data storage mode also, as specifically as
possible (“numeric” is not specific enough). Finally, tell me in each case how you reached your
answer i.e. if you used R commands, looked at the object onscreen, etc.
Two points each.
a. What type of object is iris ?
b. What type of object is the column named Species in the data set iris?
c. What type of object is islands ?
d. What place is measured in the 19th component of islands?
e. What type of object is the row names of the mtcars data?
Stat 540 Hwk 1 p.1
2. For each part below, give a single R command to accomplish the goal. Two points each.
a. Create a regularly spaced sequence of values between 0 and 10, by increments of 0.2. Do
not use the c() function.
b. Create a regularly spaced sequence from - to , of length 10. Do not type in the numerical
value of  – use a built-in trig function or built-in value to create it – this will give doubleprecision accuracy. Do not use the c() function.
c. In the islands object, New Zealand appears twice – the Northern island and the Southern
island. Give a single command to calculate the total area of both islands taken together.
d. Obtain the 5-number summary for mpg in the mtcars data frame with one command.
e. Find the standard deviation of Sepal Lengths for the iris species setosa with one command.
3. (7) Make a well-labeled histogram of the Sepal lengths of the iris setosa species. Use your
favorite color for the bars. By well-labeled, I mean follow the guidelines of the handout
4. (8) For the iris data, construct side-by-side boxplots of the Sepal lengths for the three species.
Label the plot appropriately for a formal report. Hint: read the help file for boxplot.
Stat 540 Hwk 1 p.2

Don't use plagiarized sources. Get Your Custom Essay on
stat 540 hw
Just from \$13/Page
Pages (550 words)
Approximate price: -

Why Work with Us

Top Quality and Well-Researched Papers

We always make sure that writers follow all your instructions precisely. You can choose your academic level: high school, college/university or professional, and we will assign a writer who has a respective degree.

We have a team of professional writers with experience in academic and business writing. Many are native speakers and able to perform any task for which you need help.

Free Unlimited Revisions

If you think we missed something, send your order for a free revision. You have 10 days to submit the order for review after you have received the final document. You can do this yourself after logging into your personal account or by contacting our support.

Prompt Delivery and 100% Money-Back-Guarantee

All papers are always delivered on time. In case we need more time to master your paper, we may contact you regarding the deadline extension. In case you cannot provide us with more time, a 100% refund is guaranteed.

Original & Confidential

We use several writing tools checks to ensure that all documents you receive are free from plagiarism. Our editors carefully review all quotations in the text. We also promise maximum confidentiality in all of our services.

Our support agents are available 24 hours a day 7 days a week and committed to providing you with the best customer experience. Get in touch whenever you need any assistance.

Try it now!

## Calculate the price of your order

Total price:
\$0.00

How it works?

Fill in the order form and provide all details of your assignment.

Proceed with the payment

Choose the payment system that suits you most.

Our Services

No need to work on your paper at night. Sleep tight, we will cover your back. We offer all kinds of writing services.

## Essay Writing Service

No matter what kind of academic paper you need and how urgent you need it, you are welcome to choose your academic level and the type of your paper at an affordable price. We take care of all your paper needs and give a 24/7 customer care support system.