Geoscience Reference
In-Depth Information
In particular, some practical issues of how those involved in GC research can adopt a reproduc-
ible approach have been reviewed, and its prospect has been considered. In its current state, it can
be adopted, although for some this may involve getting their hands dirty with more lower-level
computational tools than they are currently working with. It could be argued that although there
is a need for reproducible research in GC, there is also a need for GC to research reproducibility -
for example, by considering some of the problems in the concluding paragraph of Section 17.4.3.
One important characteristic of GC has always been its focus on problem solving - and in many
cases, that has meant being able to apply techniques to geographical problems for a group of end
users outside of the usual GI community. This is a strength of GC as a discipline - but perhaps the
aforementioned problems are a situation where the discipline's problem-solving focus could be used
reflectively to assist in the development and improvement of tools for reproducible analysis and
visualisation of spatial data.
APPENDIX 17A SNIPPET OF SWEAVE
The text in the following is a snippet of Sweave used to produce this document - the code sections
begin with the <<… >> = construct and are terminated by @.
\subsection{An Example of the use of \texttt{ Sweave}}
This document was created using {\tt Sweave } - a snippet of the original is shown in
Appendix 17A - and the simple example of ANOVA in Table 1 was created with some incorpo-
rated code.
\begin{table}[htp]
<<regression,echo = TRUE,keep.source = true>> =
## From: Annette Dobson (1990)
## “An Introduction to Generalized Linear Models”.
## Page 9: Plant Weight Data.
ctl <- c(4.17,5.58,5.18,6.11,4.50,4.61,5.17,4.53,5.33,5.14)
trt <- c(4.81,4.17,4.41,3.59,5.87,3.83,6.03,4.89,4.32,4.69)
Group <- gl(2,10,20, labels = c(“Ctl”,”Trt”))
Weight <- c(ctl, trt)
lm.Dobson.p9 <- lm(Weight ~ Group)
anova(lm.Dobson.p9)
@
\caption{R ANOVA - Example of Incorporated Code}
\label{anova}
\end{table}
APPENDIX 17B USE OF STANGLE
The following is the result of applying Stangle to this document, extracting the incorporated
R code. Although primarily intended to be computer readable, the result is reasonably human
readable and preserves any comments in the included code. Also note that code executed in
earlier chunks is remembered in later ones - effectively all of this code is run as a single R script.
The code chunks provide information to Sweave about where the output is to be inserted into
the document.
### R code from vignette source 'reprod.Rnw'
### Encoding: UTF-8
Search WWH ::




Custom Search