In chapter 5 of “Quantifying Archaeology”, Shennan provides some examples and 2 exercises. In this page, I try to show the steps to follow for obtaining the desired results and graphs with R.
First of all, when Shennan provides tables, you should probably enter
data in a
> burials <- edit(data.frame())
As far as I can tell, there isn’t a single function that does all that we need for plotting a graph with cumulative frequencies for ordinal data (age categories, distance rings). We are then going step by step.
Obtain proportions for each of the two categories we have to evaluate, separately, and store them in a separate vector object:
> bur1 <- prop.table(burials[]) > bur2 <- prop.table(burials[])
Then start by plotting the first category:
> plot(cumsum(bur1), type="l", col="red", ylim=c(0,1))
The R graphics window will show up with the first cumulative graph. Note
that we are explicitly requesting the drawing of a line with
and setting the graph’s area vertical limit to its maximum extension.
This is because the
lines() function, used below, cannot change the
plot’s appearance but just add objects to it.
lines() command is, though, very similar in its syntax to