library(ggplot2)
data(singer, package='lattice')

Now we want to buikd a plot layer by layer. The first layer is always with ggplot() with arguments data and aesthetics.

gg <- ggplot(singer, aes(x=voice.part, y=height))
gg

Add a layer:

gg <- gg + geom_boxplot(fill="lightgreen")
gg

gg <- gg + geom_violin(fill="lightblue")
gg

data(USArrests)
crimes <- data.frame(state=tolower(rownames(USArrests)), USArrests)
gg <- ggplot(crimes, aes(map_id=state, fill=Murder))
gg

gg <- gg + geom_map(map=map_data("state"))
gg

gg <- gg + expand_limits(x=map_data("state")$long, y=map_data("state")$lat)
gg