Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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

ASSIGNMENT 3
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.
Add a comment line that contains your name, surname, student ID and department.
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.
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 beight of the chart should be 800 and 600, respectively.
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.
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).
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.
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.
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.
image text in transcribed

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

Database Processing Fundamentals, Design, and Implementation

Authors: David M. Kroenke, David J. Auer

14th edition

133876705, 9781292107639, 1292107634, 978-0133876703

More Books

Students also viewed these Databases questions