Graphics Programs Reference
In-Depth Information
FIGurE 4-33
Time series chart framework
CrEATE A TIME SErIES ChArT
If you know how to make a scatterplot in R, you know how to make a
time series chart. Load your data and use the
plot()
function, but
instead of using
p
in the
type
argument, you use
l
as the
type
, which
stands for line.
To demonstrate, use world population data from the World Bank from
1960 to 2009. As usual load the data with the
read.csv()
function.
population <-
read.csv(“http://datasets.flowingdata.com/world-population.csv”,
sep=”,”, header=TRUE)
Search WWH ::
Custom Search