Much of what you have to do this week depends on the par() function. This function is used for manipulating the graphical parameters in Splus and it has so many options that is can get very confusing. The Splus help page for par() is rather long; it is hard to find information about a specific argument. We have created an abbreviated help page for par(). The following page includes a link to an html version of the Splus help page, which you can search using Netscape, you might find this a bit easier than using the Splus help page.
Warning: This lab can take a surprising amount of time, try not to spend too long on any one section, a few questions to BM or JH might speed you along.
Note: You can now easily manipulate the graphical parameters in Splus 4.0 We think that if you want to be able to reproduce your results easily, then using the par() command is a better idea.
par("din"); par("fin");par("pin");par("usr") plot(runif(100),runif(100)) par("din"); par("fin");par("pin");par("usr") lines(c(0,1),c(0,1)) lines(c(0.5,1),c(0,2)) par(xpd=T) lines(c(0.5,1),c(0,2))Explain to BM or JH what is going on. What do the various par(...) settings control? Try resizing the graphics window (using the mouse), then repeat the experiment. What does an "inch" mean in the par settings?
oldpar <- par() # save all the old settings # now make all your changes to par # ... # finished with the graphics par(oldpar) # restore the old settings as you leaveYou could also save just those par values that will be affected, and then restore those values as you leave--see the examples at the end of the help page for par.
Description of the data (taken from the Andrews and Herzberg book, page 63):
Great Lakes area. The data are taken from the eleven maps listed in Table 10.2. These maps are believed to be representative of the period of time commencing with the widespread knowledge that five major lakes existed in the interior of North America, and ending when relatively large scale hydrographic surveys of the lakes' shorelines were being done.
The data shown in Table 10.1 consist of the latitude, [phi], and longitude, [lambda], co-ordinates, as determined for each map, for each of 39 points easily identifiable on the eleven maps. These data were obtained by placing a grid over the old maps and doing a linear interpolation. Interpolation accuracy is felt to be good except for the indicated numbers. Also included are the current co-ordinates for the 39 points.
It is conjectured that there are five key ways a map might be systematically in error. These are: a constant error in latitude, a constant error in longitude, a proportional error in latitude, a proportional error in longitude, and error resulting in a non-zero angle between true North and the map's North. In addition, groups of locations, for example, one whole lake, may be off.
The primary task is to develop a methodology for parameterizing each map with respect to these characteristics and with respect to any other characteristics that seem to be important
Note: A minus sign indicates that the interpolation accuracy is not good.
Note: The usa() command, is okay for drawing maps of large areas of the USA, but when you zoom into smaller areas it doesn't do as well. Some versions of Splus have got a maps library that contains more accurate maps of the USA. (I know that the full version of Splus 4.0 is supposed to have the maps library, the student version doesn't have the maps library and the UNIX versions of Splus since Splus 3.3 have these libraries).