Code
library(tidyverse)
library(readr)
::opts_chunk$set(echo = TRUE) knitr
Shantanu Patil
February 23, 2022
The iris dataset is a built-in dataset in R. It can be loaded using the command data(iris)
I decided to explore the iris data for my first post of week 1.
Iris is a flowering plant, and the researchers have measured and digitally documented the varied characteristics of the many iris blossoms.
The Iris data set has 150 rows and 5 colums.There are 3 Species of Iris plant present in the dataset.
The Colums are the various dimensions of the petals which are Sepal.Length, Sepal.Width, Petal.Length, Petal.Width, Species.
[1] "Sepal.Length" "Sepal.Width" "Petal.Length" "Petal.Width" "Species"
[1] 150 5
'data.frame': 150 obs. of 5 variables:
$ Sepal.Length: num 5.1 4.9 4.7 4.6 5 5.4 4.6 5 4.4 4.9 ...
$ Sepal.Width : num 3.5 3 3.2 3.1 3.6 3.9 3.4 3.4 2.9 3.1 ...
$ Petal.Length: num 1.4 1.4 1.3 1.5 1.4 1.7 1.4 1.5 1.4 1.5 ...
$ Petal.Width : num 0.2 0.2 0.2 0.2 0.2 0.4 0.3 0.2 0.2 0.1 ...
$ Species : Factor w/ 3 levels "setosa","versicolor",..: 1 1 1 1 1 1 1 1 1 1 ...
Using the summary function in R gives us the various statistics of the values of each column in the dataset.
Sepal.Length Sepal.Width Petal.Length Petal.Width
Min. :4.300 Min. :2.000 Min. :1.000 Min. :0.100
1st Qu.:5.100 1st Qu.:2.800 1st Qu.:1.600 1st Qu.:0.300
Median :5.800 Median :3.000 Median :4.350 Median :1.300
Mean :5.843 Mean :3.057 Mean :3.758 Mean :1.199
3rd Qu.:6.400 3rd Qu.:3.300 3rd Qu.:5.100 3rd Qu.:1.800
Max. :7.900 Max. :4.400 Max. :6.900 Max. :2.500
Species
setosa :50
versicolor:50
virginica :50
---
title: "Basic R commands and exploring Iris dataset"
author: "Shantanu Patil"
desription: "Exploring and Analysing Iris dataset"
date: "02/23/2022"
format:
html:
toc: true
code-fold: true
code-copy: true
code-tools: true
categories:
- week1 post
- hw1
- shantanu patil
- dataset
---
```{r}
#| label: setup
#| warning: false
library(tidyverse)
library(readr)
knitr::opts_chunk$set(echo = TRUE)
```
## Testing c function for integers and strings and seq functions
```{r}
x <- c(2,3,4,5,8, 6, 7, 5, 3, 0, 9)
mean(x)
names = c("Om", "Damian", "Sunny", "Oguz", "Jake", "Jain")
names
y = seq(1, 14, 1.5)
y
```
## Reading the iris dataset
The iris dataset is a built-in dataset in R. It can be loaded using the command data(iris)
## Exploring the iris data
I decided to explore the iris data for my first post of week 1.
Iris is a flowering plant, and the researchers have measured and digitally documented the varied characteristics of the many iris blossoms.
The Iris data set has 150 rows and 5 colums.There are 3 Species of Iris plant present in the dataset.
The Colums are the various dimensions of the petals which are Sepal.Length, Sepal.Width, Petal.Length, Petal.Width, Species.
```{r}
data(iris)
names(iris)
dim(iris)
str(iris)
```
## Summary of iris data
Using the summary function in R gives us the various statistics of the values of each column in the dataset.
```{r}
summary(iris)
```