R offers several functions producing histograms. First the hist() function: it has a number of options to produc different types of histograms. Note that the histogram will produce a gaphical window.
par (mfrow=c(5,5)) apply(world,2,hist)The first command line defines a new graphical window that can contain 25 graphics (5 rows and 5 colums); if you omit this command, you will only see the histogram of the last variable. [Note that the par() function is use to define a wide variety of options for graphics].
Add a dotplot to a histogram:
rug() is one of the many functions that let you modify an existing graph, by adding further elements.