Iris_Report.docx - IRIS Dyanamic Report 1 Swapna Syamala...

This preview shows page 1 - 3 out of 3 pages.

IRIS Dyanamic ReportSwapna Syamala2/24/20211.The Colum names and data types of iris data setstr(iris)## '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 ...2.There are 150 rows and 5 columns in Iris data set.3.Creating a single vector (a new object) called ‘width’ that is the Sepal.Width column of iriswidth<-c(iris$Sepal.Width)4.100th value in width vectorwidth[100]## [1] 2.85.This will return the last value in width vectorwidth[length(width)]## [1] 36.Selecting rows 10 to 20, with all columns in the iris dataset.iris[10:20,] ## Sepal.Length Sepal.Width Petal.Length Petal.Width Species## 10 4.9 3.1 1.5 0.1 setosa## 11 5.4 3.7 1.5 0.2 setosa## 12 4.8 3.4 1.6 0.2 setosa## 13 4.8 3.0 1.4 0.1 setosa## 14 4.3 3.0 1.1 0.1 setosa## 15 5.8 4.0 1.2 0.2 setosa## 16 5.7 4.4 1.5 0.4 setosa## 17 5.4 3.9 1.3 0.4 setosa## 18 5.1 3.5 1.4 0.3 setosa
## 19 5.7 3.8 1.7 0.3 setosa## 20 5.1 3.8 1.5 0.3 setosa7.Selecting rows 10 to 20 with only the Species, Petal.Width and Petal.Length

  • Left Quote Icon

    Student Picture

  • Left Quote Icon

    Student Picture

  • Left Quote Icon

    Student Picture