Quick Note

This page was made for the purposes of an assignment in a geography class. It uses the iris.csv file (Fisher’s iris dataset).

Exercise 1 Markdown

Hello, and welcome to the markdown report version of Exercise 1! To start, we will need to begin by opening the iris.csv file. The variable ‘iris’ was created to easily assign it to other parts of the code.

iris = read.csv("iris.csv")

Summary Statistics

Next, let’s do some summary statistics. The average, standard deviation, and range of the sepal width have been calculated below. Note: Some parts of the original code have been modified for neatness.

Mean

print(mean(iris$Sepal.Width))
## [1] 3.057333

Standard Deviation

print(sd(iris$Sepal.Width))
## [1] 0.4358663

Range

print(range(iris$Sepal.Width))
## [1] 2.0 4.4

Making the Petal Plot

Our next task is to create a plot of the petal values. The petal length is used as the independent variable and the petal width as the dependent variable.

plot(iris$Petal.Length, iris$Petal.Width, pch=16, xlab = "Petal Length", ylab = "Petal Width", col=as.factor(iris$Species))

The Last Part

Finally, the last job to do is to estimate the petal area and save a new csv file. Note: Check the file directory where you saved this markdown file to find the new csv.

iris$Petal.Area = pi * iris$Petal.Length * iris$Petal.Width
write.csv(iris, "iris2.csv", row.names = FALSE)

Done! Thank you for viewing my report!