R language Access Menu

A useful graphics package

ggplot2 is a very useful package with simple syntax for many types of graphs. First part is to define the data.frame to be used:

       > library(ggplot2)        
       > gg = ggplot(bwdf, aes(x=age, y=lwt))

Then add layers of plot to this.

For points: 
        > gg = gg + geom_point()

For plotting, just call the gg object: 
        > gg
output (graph): 


    Comments & Feedback