Installing Packages
if (!require("devtools"))
install.packages("devtools")
## Loading required package: devtools
## Loading required package: usethis
devtools::install_github("rstudio/shiny")
## Downloading GitHub repo rstudio/shiny@master
## htmltools (0.4.0 -> 984b39c13...) [GitHub]
## mime (0.8 -> 0.9 ) [CRAN]
## rlang (0.4.5 -> 0.4.6 ) [CRAN]
## withr (2.1.2 -> 2.2.0 ) [CRAN]
## Installing 3 packages: mime, rlang, withr
##
## The downloaded binary packages are in
## /var/folders/n9/vbl5r21s4fgbkj5qjk3crfvh0000gn/T//RtmpKlooC8/downloaded_packages
## Downloading GitHub repo rstudio/htmltools@master
##
##
checking for file ‘/private/var/folders/n9/vbl5r21s4fgbkj5qjk3crfvh0000gn/T/RtmpKlooC8/remotesa30b70d6d60f/rstudio-htmltools-984b39c/DESCRIPTION’ ...
✓ checking for file ‘/private/var/folders/n9/vbl5r21s4fgbkj5qjk3crfvh0000gn/T/RtmpKlooC8/remotesa30b70d6d60f/rstudio-htmltools-984b39c/DESCRIPTION’ (404ms)
##
─ preparing ‘htmltools’:
##
checking DESCRIPTION meta-information ...
✓ checking DESCRIPTION meta-information
##
─ cleaning src
##
─ checking for LF line-endings in source and make files and shell scripts
##
─ checking for empty or unneeded directories
##
─ building ‘htmltools_0.4.0.9003.tar.gz’
##
##
checking for file ‘/private/var/folders/n9/vbl5r21s4fgbkj5qjk3crfvh0000gn/T/RtmpKlooC8/remotesa30b5f122d16/rstudio-shiny-ddcb318/DESCRIPTION’ ...
✓ checking for file ‘/private/var/folders/n9/vbl5r21s4fgbkj5qjk3crfvh0000gn/T/RtmpKlooC8/remotesa30b5f122d16/rstudio-shiny-ddcb318/DESCRIPTION’ (421ms)
##
─ preparing ‘shiny’: (763ms)
##
checking DESCRIPTION meta-information ...
✓ checking DESCRIPTION meta-information
##
─ checking for LF line-endings in source and make files and shell scripts (637ms)
##
─ checking for empty or unneeded directories
##
─ building ‘shiny_1.4.0.9002.tar.gz’
##
##
Viewing Data
head(iris,5)
## Sepal.Length Sepal.Width Petal.Length Petal.Width Species
## 1 5.1 3.5 1.4 0.2 setosa
## 2 4.9 3.0 1.4 0.2 setosa
## 3 4.7 3.2 1.3 0.2 setosa
## 4 4.6 3.1 1.5 0.2 setosa
## 5 5.0 3.6 1.4 0.2 setosa
# tail(iris,n)
# iris
Summary of Data
summary(iris)
## 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
##
##
##
Plot One
library(ggplot2)
ggplot(iris,aes(x=Sepal.Length,y=Sepal.Width,color=Species))+geom_point()
Plot Two
ggplot(iris,aes(x=Species,y=Sepal.Length))+geom_boxplot()