Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Write a code that contains the answers of the questions given below and save your file by using your name Name . R . Send

Write a code that contains the answers of the questions given below and save your file by using your
name Name.R. Send me the .R file.
1. Add a comment line that contains your name, surname, student ID and department.
2. Draw a Box-and-Whisker Plot by using iris dataset (Petal length vs Species).
- Show the box-plot of each species at the same plot.
- Label x and y axes. Give a title to the chart.
- Show all the necessary information to build the box plots in a list.
- Save your plot by using appropriate codes. The name of the file will be Name-BoxPlot.png(i.e.,
Seza-BoxPlot.png). Width and height of the chart should be 800 and 600, respectively.
3. Draw a Histogram by using iris dataset (Frequency vs. Petal length).
- Set the color of the histogram as red.
- Label x and y axes. Give a title to the chart.
- Show all the necessary information to build the histogram in a list.
- Save your plot by using appropriate codes. The name of the file will be Name-Histogram.png(i.e.,
Seza-Histogram.png). Width and height of the chart should be 800 and 600, respectively.
4. Create a dataframe called Name.Iris (i.e., Seza.Iris) by assigning all the content in the iris dataset.
- Create a file called Name.csv(i.e., Seza.csv) by using write.csv command. The fill should contain
the data frame you created.
- Use Read.csv command to assign the data in the Name.csv file to a dataframe named Name.
- Use str() command to check the structure of the Name dataframe.
- Use summary() command to check the descriptive statistics of the Name dataframe.
5. Create education and test sets by using iris data set.
- Use set.seed() command to generate the same random numbers.
- The sample size of the test set will be 25. The remaining data will be at the education set.
- The name of the test set will be Name.test(i.e., Seza.test).
- The name of the education set will be Name.education(i.e., Seza.education).
6. Create a linear model by using iris data set.
- Dependent variable will be Sepal Length.
- All the other variables will be independent variables.
- The name of the model will be Name.model1(i.e., Seza.model1).
- Show the summary of the model.
7. Create a linear model by using iris data set.
- Dependent variable will be Sepal Length.
- All the other variables (except species) will be independent variables.
- The name of the model will be Name.model2(i.e., Seza.model2).
- Show the summary of the model.
8. Create a linear model by using iris data set.
- Dependent variable will be Sepal Length. Sepal Width will be the independent variable.
- The name of the model will be Name.model3(i.e., Seza.model3).
- Show the summary of the model.

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Introduction To Data Mining

Authors: Pang Ning Tan, Michael Steinbach, Vipin Kumar

1st Edition

321321367, 978-0321321367

More Books

Students also viewed these Databases questions

Question

What are HR ethics?

Answered: 1 week ago

Question

What does corporate sustainability mean?

Answered: 1 week ago