Recently Published
histogram
hist(mpg)
Auto [ Auto$mpg > 40 , c("mpg","name") ]
# verify chart mpg > 40
mpg name
245 43.1 volkswagen rabbit custom diesel
310 41.5 vw rabbit
323 46.6 mazda glc
325 40.8 datsun 210
326 44.3 vw rabbit c (diesel)
327 43.4 vw dasher (diesel)
330 44.6 honda civic 1500 gl
394 44.0 vw pickup
pairs function
pairs(Auto, col = 3)
creates a scatterplot matrix i.e. for every pair of
variables for any given data set ( e.g. Auto )
pairs subset
pairs(~ mpg + displacement + horsepower, Auto, col=2)
The pairs() function creates a scatterplot matrix.
This example produces a subset of the variables
rainbow(6)
> ggplot(mtcars,aes(x=factor(carb)))+
geom_bar(fill=rainbow(6))
ggplot2
> ggplot(mtcars,aes(x=factor(cyl)))+
geom_bar(fill=rainbow(3))
Persp
> x=seq(-pi,pi,length=50)
> contour(x,y,fa,nlevels=15)
> image(x,y,fa)
> persp(x,y,fa)
> persp(x,y,fa,theta=30)
> persp(x,y,fa,theta=30,phi=40)
plotxy
x y random plot