hist(mtcars$mpg)

boxplot(mtcars$mpg~mtcars$gear)
attach(mtcars)
boxplot(mpg~gear)

hist(mpg)

plot(iris$Sepal.Length)

data("iris")
plot(iris$Sepal.Length,iris$Species)

plot(iris$Species,iris$Sepal.Length)

plot(iris)

plot(iris$Sepal.Length,type = 'l')

plot(AirPassengers,type = 'l')

boxplot(iris$Sepal.Length)

summary(iris$Sepal.Length)
## Min. 1st Qu. Median Mean 3rd Qu. Max.
## 4.300 5.100 5.800 5.843 6.400 7.900
fivenum(iris$Sepal.Length)
## [1] 4.3 5.1 5.8 6.4 7.9
boxplot(iris$Sepal.Length~iris$Species)

data("mtcars")
head(mtcars)
## mpg cyl disp hp drat wt qsec vs am gear carb
## Mazda RX4 21.0 6 160 110 3.90 2.620 16.46 0 1 4 4
## Mazda RX4 Wag 21.0 6 160 110 3.90 2.875 17.02 0 1 4 4
## Datsun 710 22.8 4 108 93 3.85 2.320 18.61 1 1 4 1
## Hornet 4 Drive 21.4 6 258 110 3.08 3.215 19.44 1 0 3 1
## Hornet Sportabout 18.7 8 360 175 3.15 3.440 17.02 0 0 3 2
## Valiant 18.1 6 225 105 2.76 3.460 20.22 1 0 3 1
boxplot(hp~cyl)

boxplot(mpg~cyl)

boxplot(mpg~gear)

barplot(iris$Sepal.Length)

barplot(table(cyl,mpg))

barplot(table(gear,mpg))

pie(table(iris$Species))

pie(table(cyl))

pie(table(gear))

barplot(table(cyl))

barplot(table(gear))

par(mfrow=c(2,2))
par(mfrow=c(1,2))
par(mfrow=c(1,1))
hist(mpg)

hist(mpg,breaks=10)

plot(density(mpg))
rug(mpg)
rug(iris$Sepal.Length)

par(mfrow=c(2,3))
plot(iris$Sepal.Length)
hist(iris$Sepal.Length)
boxplot(iris$Sepal.Length)
plot(iris$Sepal.Length,iris$Species)
hist(iris$Sepal.Length,breaks=10)
boxplot(iris$Sepal.Length~iris$Species)

par(mfrow=c(1,1))
par(bg="grey")
boxplot(iris$Sepal.Length~iris$Species,col="yellow")

attach(iris)
par(bg="yellow")
boxplot(Sepal.Length~Species,main="This is a box plot",xlab="Species of Flowers",ylab="Measurment in mm",col="green")

par(bg="white")
boxplot(Sepal.Length~Species,main="This is a box plot",xlab="Species of Flowers",ylab="Measurment in mm",col="green",xlim=c(0.1,2.5),ylim=c(3,10))

par(mfrow=c(2,2))
hist(mpg,col=topo.colors(5))
hist(mpg,col=topo.colors(8))
hist(mpg,col = cm.colors(5))
hist(mpg,col = heat.colors(5))

hist(mpg,col = terrain.colors(5))
par(mfrow=c(1,1))

library(RColorBrewer)
## Warning: package 'RColorBrewer' was built under R version 3.2.3
display.brewer.all()

par(mfrow=c(3,3))
hist(mpg,col = brewer.pal(5,"Blues"))
hist(mpg,col = brewer.pal(5,"Oranges"))
hist(mpg,col = brewer.pal(5,"Greens"))
hist(mpg,col = brewer.pal(5,"Greys"))
hist(mpg,col = brewer.pal(5,"Set1"))
hist(mpg,col = brewer.pal(5,"Set2"))
hist(mpg,col = brewer.pal(5,"Set3"))
hist(mpg,col = brewer.pal(5,"Accent"))
hist(mpg,col = brewer.pal(5,"Pastel1"))
library(tabplot)
## Warning: package 'tabplot' was built under R version 3.2.3
## Loading required package: ffbase
## Warning: package 'ffbase' was built under R version 3.2.3
## Loading required package: ff
## Warning: package 'ff' was built under R version 3.2.3
## Loading required package: bit
## Warning: package 'bit' was built under R version 3.2.3
## Attaching package bit
## package:bit (c) 2008-2012 Jens Oehlschlaegel (GPL-2)
## creators: bit bitwhich
## coercion: as.logical as.integer as.bit as.bitwhich which
## operator: ! & | xor != ==
## querying: print length any all min max range sum summary
## bit access: length<- [ [<- [[ [[<-
## for more help type ?bit
##
## Attaching package: 'bit'
##
## The following object is masked from 'package:base':
##
## xor
##
## Attaching package ff
## - getOption("fftempdir")=="C:/Users/Ashwini/AppData/Local/Temp/RtmpQPWnN5"
##
## - getOption("ffextension")=="ff"
##
## - getOption("ffdrop")==TRUE
##
## - getOption("fffinonexit")==TRUE
##
## - getOption("ffpagesize")==65536
##
## - getOption("ffcaching")=="mmnoflush" -- consider "ffeachflush" if your system stalls on large writes
##
## - getOption("ffbatchbytes")==41775267.84 -- consider a different value for tuning your system
##
## - getOption("ffmaxbytes")==2088763392 -- consider a different value for tuning your system
##
##
## Attaching package: 'ff'
##
## The following objects are masked from 'package:bit':
##
## clone, clone.default, clone.list
##
## The following objects are masked from 'package:utils':
##
## write.csv, write.csv2
##
## The following objects are masked from 'package:base':
##
## is.factor, is.ordered
##
##
## Attaching package: 'ffbase'
##
## The following objects are masked from 'package:ff':
##
## [.ff, [<-.ff
##
## The following objects are masked from 'package:base':
##
## %in%, table

tableplot(mtcars)
## Warning in tableplot_checkBins(nBins, max(N, 2)): Setting nBins (100) to
## number of rows (32)

tableplot(iris)

library(ggplot2)
##
## Attaching package: 'ggplot2'
##
## The following object is masked from 'mtcars':
##
## mpg
tableplot(iris)
