SlideShare a Scribd company logo
Using R for Digital Soil Mapping Progress in
Soil Science Malone install download
http://ebookstep.com/product/using-r-for-digital-soil-mapping-
progress-in-soil-science-malone/
Download more ebook from https://ebookstep.com
We believe these products will be a great fit for you. Click
the link to download now, or visit ebookstep.com
to discover even more!
Parallel Genetic Algorithms for Financial Pattern
Discovery Using GPUs SpringerBriefs in Applied Sciences
and Technology Baúto
http://ebookstep.com/product/parallel-genetic-algorithms-for-
financial-pattern-discovery-using-gpus-springerbriefs-in-applied-
sciences-and-technology-bauto/
Public Investment Criteria: Using an Interregional
Input-Output Programming Model (New Frontiers in
Regional Science: Asian Perspectives, 2) Kohno
http://ebookstep.com/product/public-investment-criteria-using-an-
interregional-input-output-programming-model-new-frontiers-in-
regional-science-asian-perspectives-2-kohno/
Statistique et Data Science Avec R François Husson
http://ebookstep.com/product/statistique-et-data-science-avec-r-
francois-husson/
Science and Technology for Society 5 0 Tim Penulis
http://ebookstep.com/product/science-and-technology-for-
society-5-0-tim-penulis/
Science questions in Sindhi Pakistani
http://ebookstep.com/product/science-questions-in-sindhi-
pakistani/
The Morphophonological Development of the Classical
Aramaic Verb Linguistic Studies in Ancient West Semitic
1st Edition Malone
http://ebookstep.com/product/the-morphophonological-development-
of-the-classical-aramaic-verb-linguistic-studies-in-ancient-west-
semitic-1st-edition-malone/
Intro to Python for Computer Science and Data Science:
Learning to Program with AI, Big Data and The Cloud 1st
Edition Deitel
http://ebookstep.com/product/intro-to-python-for-computer-
science-and-data-science-learning-to-program-with-ai-big-data-
and-the-cloud-1st-edition-deitel/
Data Science Инсайдерская информация для новичков
Включая язык R 1st Edition Кэти О’Нил
https://ebookstep.com/download/ebook-10651576/
Qualität und Data Science in der Marktforschung
Bernhard Keller
http://ebookstep.com/product/qualitat-und-data-science-in-der-
marktforschung-bernhard-keller/
Progress in Soil Science
Brendan P. Malone
Budiman Minasny
Alex B. McBratney
Using R for
Digital Soil
Mapping
Progress in Soil Science
Series editors
Alfred E. Hartemink, Department of Soil Science, FD Hole Soils Lab,
University of Wisconsin—Madison, USA
Alex B. McBratney, Sydney Institute of Agriculture,
The University of Sydney, Eveleigh, NSW, Australia
Aims and Scope
Progress in Soil Science series aims to publish books that contain novel approaches
in soil science in its broadest sense – books should focus on true progress in a
particular area of the soil science discipline. The scope of the series is to publish
books that enhance the understanding of the functioning and diversity of soils
in all parts of the globe. The series includes multidisciplinary approaches to soil
studies and welcomes contributions of all soil science subdisciplines such as: soil
genesis, geography and classification, soil chemistry, soil physics, soil biology,
soil mineralogy, soil fertility and plant nutrition, soil and water conservation,
pedometrics, digital soil mapping, proximal soil sensing, digital soil morphometrics,
soils and land use change, global soil change, natural resources and the environment.
More information about this series at http://www.springer.com/series/8746
Brendan P. Malone • Budiman Minasny
Alex B. McBratney
Using R for Digital
Soil Mapping
123
Brendan P. Malone
Sydney Institute of Agriculture
The University of Sydney
Eveleigh, NSW, Australia
Alex B. McBratney
Sydney Institute of Agriculture
The University of Sydney
Eveleigh, NSW, Australia
Budiman Minasny
Sydney Institute of Agriculture
The University of Sydney
Eveleigh, NSW, Australia
ISSN 2352-4774 ISSN 2352-4782 (electronic)
Progress in Soil Science
ISBN 978-3-319-44325-6 ISBN 978-3-319-44327-0 (eBook)
DOI 10.1007/978-3-319-44327-0
Library of Congress Control Number: 2016948860
© Springer International Publishing Switzerland 2017
This work is subject to copyright. All rights are reserved by the Publisher, whether the whole or part of
the material is concerned, specifically the rights of translation, reprinting, reuse of illustrations, recitation,
broadcasting, reproduction on microfilms or in any other physical way, and transmission or information
storage and retrieval, electronic adaptation, computer software, or by similar or dissimilar methodology
now known or hereafter developed.
The use of general descriptive names, registered names, trademarks, service marks, etc. in this publication
does not imply, even in the absence of a specific statement, that such names are exempt from the relevant
protective laws and regulations and therefore free for general use.
The publisher, the authors and the editors are safe to assume that the advice and information in this book
are believed to be true and accurate at the date of publication. Neither the publisher nor the authors or
the editors give a warranty, express or implied, with respect to the material contained herein or for any
errors or omissions that may have been made.
Printed on acid-free paper
This Springer imprint is published by Springer Nature
The registered company is Springer International Publishing AG Switzerland
Foreword
Digital soil mapping is a runaway success. It has changed the way we approach
soil resource assessment all over the world. New quantitative DSM products with
associated uncertainty are appearing weekly. Many techniques and approaches have
been developed. We can map the whole world or a farmer’s field. All of this has
happened since the turn of the millennium. DSM is now beginning to be taught
in tertiary institutions everywhere. Government agencies and private companies
are building capacity in this area. Both practitioners of conventional soil mapping
methods and undergraduate and research students will benefit from following the
easily laid out text and associated scripts in this book carefully crafted by Brendan
Malone and colleagues. Have fun and welcome to the digital soil century.
Dominique Arrouays – Scientific coordinator of GlobalSoilMap.
v
Preface
Digital soil mapping (DSM) has evolved from a science-driven research phase of
the early 1990s to presently a fully operational and functional process for spatial
soil assessment and measurement. This evolution is evidenced by the increasing
extents of DSM projects from small research areas towards regional, national and
even continental extents.
Significant contributing factors to the evolution of DSM have been the advances
in information technologies and computational efficiency in recent times. Such
advances have motivated numerous initiatives around the world to build spatial data
infrastructures aiming to facilitate the collection, maintenance, dissemination and
use of spatial information. Essentially, fine-scaled earth resource information of
improving qualities is gradually coming online. This is a boon for the advancement
of DSM. More importantly, however, the contribution of the DSM community in
general to the development of such generic spatial data infrastructure has been
through the ongoing creation and population of regional, continental and worldwide
soil databases from existing legacy soil information. Ambitious projects such as
those proposed by the GlobalSoilMap consortium, whose objective is to generate
a fine-scale 3D grid of a number of soil properties across the globe, provide
some guide to where DSM is headed operationally. We are also seeing in some
countries of the world the development of nationally consistent comprehensive
digital soil information systems—the Australian Soil Grid http://www.clw.csiro.au/
aclep/soilandlandscapegrid/ being particularly relevant in that regard. Besides the
mapping of soil properties and classes, DSM approaches have been extended to
other soil spatial analysis domains such as those of digital soil assessment (DSA)
and digital soil risk assessment (DSRA).
It is an exciting time to be involved in DSM. But with development and an
increase in the operational status of DSM, there comes a requirement to teach, share
and spread the knowledge of DSM. Put more simply, there is a need to teach more
people how to do it. It is such that this book attempts to share and disseminate some
of that knowledge.
vii
viii Preface
The focus of the materials contained in the book is to learn how to carry out DSM
in a real work situation. It is procedural and attempts to give the participant a taste
and a conceptual framework to undertake DSM in their own technical fields. The
book is very instructional—a manual of sorts—and therefore completely interactive
in that participants can access and use the available data and complete exercises
using the available computer scripts. The examples and exercises in the book
are delivered using the R computer programming environment. Subsequently, this
course is both training in DSM and R. Using R, this course will introduce some basic
R operations and functionality in order to gain some fluency in this popular scripting
language. The DSM exercises will cover procedures for handling and manipulating
soil and spatial data in R and then introduce some basic concepts and practices
relevant to DSM, which importantly includes the creation of digital soil maps. As
you will discover, DSM is a broad term that entails many applications, of which a
few are covered in this book.
The material contained in this book has been cobbled together over successive
years from 2009. This effort has largely been motivated by the need to prepare a
hands-on DSM training course with associated materials as an outreach programme
of the Pedometrics and Soil Security research group at the University of Sydney. The
various DSM workshops have been delivered to a diverse range of participants: from
undergraduates, to postgraduates, to tenured academics, as well as both private and
government scientists and consultants. These workshops have been held both at the
Soil Security laboratories at the University of Sydney, as well as various locations
around the world. The ongoing development of teaching materials for DSM needs to
continue over time as new discoveries and efficiencies are made in the field of DSM
and, more generally, pedometrics. Therefore, we would be very grateful to receive
feedback and suggestions on ways to improve the book so that the materials remain
accessible, up to date and relevant.
Eveleigh, Australia Brendan P. Malone
Budiman Minasny
Alex B. McBratney
Endorsements
This book entitled Using R for Digital Soil Mapping is an excellent book that
clearly outlines the step-by-step procedures required for many aspects of digital soil
mapping. This is my first time to learn R language and spatial modelling for DSM,
but with the instructive book, it’s easy to produce different DSMs by following
text and associate R scripts. It has been especially useful in Taiwan for soil organic
carbon stock mapping in different soil depths and of different parent materials and
different land uses. The other good experience is the clear pointers on how to prepare
the covariates to build the spatial prediction functions for DSM by regression models
if we do not have enough soil data. I strongly recommend this excellent book to any
person to apply DSM techniques for studying the spatial variability of agriculture
and environmental sciences.
Distinguished Professor Zueng-Sang Chen, Department of Agricultural
Chemistry, National Taiwan University, Taipei, Taiwan.
I can recommend this book as an excellent support for those wanting to learn
digital soil mapping methods. The hands-on exercises provide invaluable examples
of code for implementing in the R computing language. The book will certainly
assist you to develop skills in R. It will also introduce you to a very wide range
of powerful numerical and categorical modelling approaches that are emerging to
enable quantitative spatial and temporal inference of soil attributes at all scales from
local to global. There is also a valuable chapter on how to assess uncertainty of the
digital soil map that has been produced. The book exemplifies the quantum leap that
is occurring in quantitative spatial and temporal modelling of soil attributes, and is
a must for students of this discipline.
Carolyn Hedley, Soil Scientist, New Zealand.
Using R for Digital Soil Mapping is a fantastic resource that has enabled us to
develop and build our skills in digital soil mapping (DSM) from scratch, so much so
that this discipline has now become part of our agency core business in Tasmanian
land evaluation. It’s thorough instructional content has enabled us to deliver a state-
wide agricultural enterprise suitability mapping programme, developing quantitative
ix
x Endorsements
soil property surfaces with uncertainties through predictive spatial modelling,
including covariate processing, optimised soil sampling strategies and standardised
soil depth-spline functions. We continually refer to this ‘easy to follow’ guide when
developing the necessary R-code to undertake our DSM; using the freely available R
environment rather than commercial software in itself has saved thousands of dollars
in software fees and allowed automation and time-saving in many DSM tasks. This
book is a must for any individual, academic institution or government soil agency
wishing to embark into the rapidly developing world of DSM for land evaluation,
and will definitely ease the ‘steepness’ in the learning curve.
Darren Kidd, Department of Primary Industries Parks Water and Environ-
ment, Tasmania, Australia.
This excellent book contains clear step-by-step examples in digital soil mapping
(DSM), such as how to prepare covariates, to build spatial prediction functions using
either regression or classification models and to apply the prediction functions to
produce maps and their uncertainties. When I started my research in DSM, I have
very little experience in R and spatial modelling. By following clear instructions
presented in this book, I have succeeded in learning and developing DSM techniques
for mapping the depth and carbon stock in Indonesian tropical peatlands. I highly
recommend this book to anyone who wants to learn and apply DSM techniques.
Rudiyanto, Institut Pertanian Bogor, Indonesia.
Acknowledgements
Special thanks to those who have contributed to the development of materials in
this book. Pierre Roudier is pretty much solely responsible for helping put together
the materials regarding interactive mapping and the caret package for digital soil
mapping. Colleagues at the University of Sydney, especially Uta Stockmann,
have given continual feedback throughout the development of the DSM teaching
materials of the past number of years. Lastly, we are grateful to the numerous
participants of our DSM workshops throughout the world. With their feedback
and questions, the materials have evolved and been honed over time to make this
a reasonably substantial one-stop shop for practicable DSM. Cheers to all!
xi
Contents
1 Digital Soil Mapping ....................................................... 1
1.1 The Fundamentals of Digital Soil Mapping......................... 1
1.2 What Is Going to Be Covered in this Book? ........................ 4
References.................................................................... 5
2 R Literacy for Digital Soil Mapping ...................................... 7
2.1 Objective.............................................................. 7
2.2 Introduction to R ..................................................... 7
2.2.1 R Overview and History .................................... 7
2.2.2 Finding and Installing R .................................... 8
2.2.3 Running R: GUI and Scripts ............................... 8
2.2.4 RStudio...................................................... 9
2.2.5 R Basics: Commands, Expressions,
Assignments, Operators, Objects .......................... 10
2.2.6 R Data Types ................................................ 13
2.2.7 R Data Structures ........................................... 15
2.2.8 Missing, Indefinite, and Infinite Values.................... 17
2.2.9 Functions, Arguments, and Packages...................... 18
2.2.10 Getting Help ................................................ 21
2.2.11 Exercises .................................................... 22
2.3 Vectors, Matrices, and Arrays ....................................... 23
2.3.1 Creating and Working with Vectors ....................... 23
2.3.2 Vector Arithmetic, Some Common Functions,
and Vectorised Operations ................................. 26
2.3.3 Matrices and Arrays ........................................ 29
2.3.4 Exercises .................................................... 31
2.4 Data Frames, Data Import, and Data Export ........................ 32
2.4.1 Reading Data from Files ................................... 33
2.4.2 Creating Data Frames Manually ........................... 36
2.4.3 Working with Data Frames................................. 37
xiii
xiv Contents
2.4.4 Writing Data to Files ....................................... 40
2.4.5 Exercises .................................................... 41
2.5 Graphics: The Basics................................................. 41
2.5.1 Introduction to the Plot Function ........................ 41
2.5.2 Exercises .................................................... 45
2.6 Manipulating Data.................................................... 46
2.6.1 Modes, Classes, Attributes, Length, and Coercion........ 46
2.6.2 Indexing, Sub-setting, Sorting, and Locating Data ....... 48
2.6.3 Factors....................................................... 56
2.6.4 Combining Data ............................................ 57
2.6.5 Exercises .................................................... 58
2.7 Exploratory Data Analysis ........................................... 58
2.7.1 Summary Statistics ......................................... 58
2.7.2 Histograms and Box Plots.................................. 59
2.7.3 Normal Quantile and Cumulative Probability Plots....... 62
2.7.4 Exercises .................................................... 64
2.8 Linear Models: The Basics .......................................... 64
2.8.1 The lm Function, Model Formulas, and
Statistical Output ........................................... 64
2.8.2 Linear Regression .......................................... 65
2.8.3 Exercises .................................................... 71
2.9 Advanced Work: Developing Algorithms with R ................... 71
Reference..................................................................... 79
3 Getting Spatial in R......................................................... 81
3.1 Basic GIS Operations Using R....................................... 82
3.1.1 Points........................................................ 82
3.1.2 Rasters....................................................... 85
3.2 Advanced Work: Creating Interactive Maps in R ................... 88
3.3 Some R Packages That Are Useful for Digital Soil Mapping ...... 91
Reference..................................................................... 93
4 Preparatory and Exploratory Data Analysis for Digital
Soil Mapping ................................................................ 95
4.1 Soil Depth Functions ................................................. 96
4.1.1 Fit Mass Preserving Splines with R........................ 97
4.2 Intersecting Soil Point Observations with
Environmental Covariates............................................ 101
4.2.1 Using Rasters from File .................................... 105
4.3 Some Exploratory Data Analysis .................................... 106
References.................................................................... 116
5 Continuous Soil Attribute Modeling and Mapping ..................... 117
5.1 Model Validation ..................................................... 117
5.1.1 Model Goodness of Fit ..................................... 118
5.1.2 Model Validation ........................................... 119
Contents xv
5.2 Multiple Linear Regression .......................................... 122
5.2.1 Applying the Model Spatially.............................. 126
5.3 Decision Trees........................................................ 130
5.4 Cubist Models ........................................................ 133
5.5 Random Forests ...................................................... 136
5.6 Advanced Work: Model Fitting with Caret Package ............... 141
5.7 Regression Kriging ................................................... 143
5.7.1 Universal Kriging........................................... 144
5.7.2 Regression Kriging with Cubist Models................... 146
References.................................................................... 149
6 Categorical Soil Attribute Modeling and Mapping ..................... 151
6.1 Model Validation of Categorical Prediction Models................ 152
6.2 Multinomial Logistic Regression .................................... 155
6.3 C5 Decision Trees .................................................... 161
6.4 Random Forests ...................................................... 164
References.................................................................... 167
7 Some Methods for the Quantification of Prediction
Uncertainties for Digital Soil Mapping................................... 169
7.1 Universal Kriging Prediction Variance .............................. 170
7.1.1 Defining the Model Parameters ............................ 170
7.1.2 Spatial Mapping ............................................ 173
7.1.3 Validating the Quantification of Uncertainty .............. 176
7.2 Bootstrapping......................................................... 178
7.2.1 Defining the Model Parameters ............................ 179
7.2.2 Spatial Mapping ............................................ 182
7.2.3 Validating the Quantification of Uncertainty .............. 185
7.3 Empirical Uncertainty Quantification Through Data
Partitioning and Cross Validation.................................... 187
7.3.1 Defining the Model Parameters ............................ 188
7.3.2 Spatial Mapping ............................................ 192
7.3.3 Validating the Quantification of Uncertainty .............. 195
7.4 Empirical Uncertainty Quantification Through Fuzzy
Clustering and Cross Validation ..................................... 198
7.4.1 Defining the Model Parameters ............................ 200
7.4.2 Spatial Mapping ............................................ 211
7.4.3 Validating the Quantification of Uncertainty .............. 216
References.................................................................... 218
8 Using Digital Soil Mapping to Update, Harmonize and
Disaggregate Legacy Soil Maps ........................................... 221
8.1 DSMART: An Overview ............................................. 223
8.2 Implementation of DSMART........................................ 224
8.2.1 DSMART with R ........................................... 224
References.................................................................... 229
xvi Contents
9 Combining Continuous and Categorical Modeling: Digital
Soil Mapping of Soil Horizons and Their Depths ....................... 231
9.1 Two-Stage Model Fitting and Validation............................ 234
9.2 Spatial Application of the Two-Stage Soil Horizon
Occurrence and Depth Model........................................ 242
References.................................................................... 244
10 Digital Soil Assessments ................................................... 245
10.1 A Simple Enterprise Suitability Example ........................... 245
10.1.1 Mapping Example of Digital Land
Suitability Assessment ..................................... 249
10.2 Homosoil: A Procedure for Identifying Areas with
Similar Soil Forming Factors ........................................ 254
10.2.1 Global Climate, Lithology and Topography Data......... 254
10.2.2 Estimation of Similarity .................................... 255
10.2.3 The homosoil Function .................................. 256
10.2.4 Example of Finding Soil Homologues .................... 259
References.................................................................... 260
Index............................................................................... 261
Chapter 1
Digital Soil Mapping
1.1 The Fundamentals of Digital Soil Mapping
In recent times we have bared witness to the advancement of the computer and
information technology ages. With such advances, there have come vast amounts of
data and tools in all fields of endeavor. This has motivated numerous initiatives
around the world to build spatial data infrastructures aiming to facilitate the
collection, maintenance, dissemination and use of spatial information. Soil science
potentially contributes to the development of such generic spatial data infrastructure
through the ongoing creation of regional, continental and worldwide soil databases,
and which are now operational for some uses e.g., land resource assessment and risk
evaluation (Lagacherie and McBratney 2006).
Unfortunately the existing soil databases are neither exhaustive enough nor
precise enough for promoting an extensive and credible use of the soil information
within the spatial data infrastructure that is being developed worldwide. The
main reason is that their present capacities only allow the storage of data from
conventional soil surveys which are scarce and sporadically available (Lagacherie
and McBratney 2006).
The main reason for this lack of soil spatial data is simply that conventional
soil survey methods are relatively slow and expensive. Furthermore, we have also
witnessed a global reduction in soil science funding that started in the 1980s
(Hartemink and McBratney 2008), which has meant a significant scaling back in
wide scale soil spatial data collection and/or conventional soil surveying.
To face this situation, it is necessary for the current spatial soil information
systems to extend their functionality from the storage and use of digitized (existing)
soil maps, to the production of soil maps ab initio (Lagacherie and McBratney
2006). This is precisely the aim of Digital Soil Mapping (DSM) which can be
defined as:
© Springer International Publishing Switzerland 2017
B.P. Malone et al., Using R for Digital Soil Mapping,
Progress in Soil Science, DOI 10.1007/978-3-319-44327-0_1
1
2 1 Digital Soil Mapping
The creation and population of spatial soil information systems by numerical models infer-
ring the spatial and temporal variations of soil types and soil properties from soil observation
and knowledge from related environmental variables. (Lagacherie and McBratney 2006)
The concepts and methodologies for DSM were formalized in an extensive
review by McBratney et al. (2003). In the McBratney et al. (2003) paper, the
scorpan approach for predictive modelling (and mapping) of soil was introduced,
which in itself is rooted in earlier works by Jenny (1941) and Russian soil scientist
Dokuchaev. scorpan is a mnemonic for factors for prediction of soil attributes: soil,
climate, organisms, relief, parent materials, age, and spatial position. The scorpan
approach is formulated by the equation:
S D f.s; o; r; r; p; a; n/ C 
or
S D f.Q/ C 
Long-handed, the equation states that the soil type or attribute at an unvisited site
(S) can be predicted from a numerical function or model (f) given the factors just
described plus the locally varying, spatial dependent residuals ./. The f(Q) part
of the formulation is the deterministic component or in other words, the empirical
quantitative function linking S to the scorpan factors (Lagacherie and McBratney
2006). The scorpan factors or environmental covariates come in the form of spatially
populated digitally available data, for instance from digital elevation models and
the indices derived from them—slope, aspect, MRVBF etc. Landsat data, and other
remote sensing images, radiometric data, geological survey maps, legacy soil maps
and data, just to name a few. For the residuals ./ part of the formulation, we assume
there to be some spatial structure. This is for a number of reasons which include
that the attributes used in the deterministic component were inadequate, interactions
between attributes were not taken into account, or the form of f() was mis-specified.
Overall this general formulation is called the scorpan kriging method, where the
kriging component is the process of defining the spatial trend of the residuals (with
variograms) and using kriging to estimate the residuals at the non-visited sites.
Without getting into detail with regards to some of the statistical nuances such as
bias issues—which can be prevalent when using legacy soil point data for DSM—
that are encountered with using this type of data, the application of scorpan kriging
can only be done in extents where there is available soil point data. The challenge
therefore is: what to do in situations where this type of data is not available? In the
context of the global soil mapping key soil attributes, this is a problem, but can be
overcome with the usage of other sources of legacy soil data such as existing soil
maps. It is even more of a problem when this information is not available either.
However, in the context of global soil mapping, Minasny and McBratney (2010)
proposed a decision tree structure for actioning DSM on the basis of the nature of
available legacy soil data. This is summarized in Fig. 1.1. But bear in mind that this
1.1 The Fundamentals of Digital Soil Mapping 3
Define an area of interest
Assemble environmental covariates
Which soil data are available?
Assign quality of soil data and coverage in the covariate space
Detailed soil maps
with legends
and soil point data
Soil point data
Detailed soil maps
with legends
No data
Homosoil
Full Cover?
Full Cover?
Soil maps:
- Spatial disaggregation
- scorpan kriging
- Ensemble
Extrapolation from
reference areas:
- Soil maps
- Soil point data
- Spatial disaggregation
- Spatially weighted mean
Increase uncertainty in prediction
(depends on the quality of data and complexity of soil cover)
Extrapolation from
reference areas
Spatially weighted mean
Yes
Yes
No
No
scorpan
kriging
Fig. 1.1 A decision tree for digital soil mapping based on legacy soil data (Adapted from Minasny
and McBratney 2010)
decision tree is not constrained only to DSM at a global scale but at any mapping
extent where the user wishes to perform DSM given the availability of soil data for
their particular area.
As can be seen from Fig. 1.1, once you have defined an area of interest, and
assembled a suite of environmental covariates for that area, then determined the
availability of the soil data there, you follow the respective pathway. scorpan kriging
is performed exclusively when there is only point data, but can be used also when
there is both point and map data available, e.g., (Malone et al. 2014). The work flow
is quite different when there is only soil map information available. Bear in mind
that the quality of the soil map depends on the scale and subsequently variation
of soil cover; such that smaller scaled maps e.g., 1:100,000 would be considered
better and more detailed than large scaled maps e.g., 1:500,000. The elemental basis
for extracting soil properties from legacy soil maps comes from the central and
distributional concepts of soil mapping units. For example, modal soil profile data
of soil classes can be used to quickly build soil property maps. Where mapping
units consist of more than one component, we can use a spatially weighted means
type method i.e., estimation of the soil properties is based on the modal profile
of the components and the proportional area of the mapping unit each component
covers, e.g., (Odgers et al. 2012). As a pre-processing step prior to creating soil
attribute maps, it may be necessary to harmonize soil mapping units (in the case of
adjacent soil maps) and/or perform some type of disaggregation technique in order
to retrieve the map unit component information. Some approaches for doing so have
4 1 Digital Soil Mapping
been described in Bui and Moran (2003). More recently soil map disaggregation has
been a target of DSM interest with a sound contribution from Odgers et al. (2014)
for extracting individual soil series or soil class information from convolved soil
map units by way of the DSMART algorithm. The DSMART algorithm can best
be explained as a data mining with repeated re-sampling algorithm. Furthering the
DSMART algorithm, Odgers et al. (2015) then introduced the PROPR algorithm
which takes probability outputs from DSMART together with modal soil profile
data of given soil classes, to estimate soil attribute quantities (with estimates of
uncertainty).
What is the process when there is no soil data available at all? This is obviously
quite a difficult situation to confront, but a real one at that. The central concept that
was discussed by Minasny and McBratney (2010) for addressing these situations is
based on the assumed homology of soil forming factors between a reference area
and the region of interest for mapping. Malone et al. (2016) provides a further
overview of the topic together with a real world application which compared
different extrapolating functions. Overall, the soil homologue concept or Homosoil,
relative to other areas of DSM research is still in its development. But considering
from a global perspective, the sparseness of soil data and limited research funds
for new soil survey, application of the Homosoil approach or other analogues will
become increasingly important for the operational advancement of DSM.
1.2 What Is Going to Be Covered in this Book?
This book covers some of the territory that is described in Fig. 1.1, particularly
the scorpan kriging type approach of DSM; as this is probably most commonly
undertaken. Also covered is spatial disagregation of polygonal maps. This is framed
in the context of updating digital soil maps and downscaling in terms of deriving
soil class or attribute information from aggregated soil mapping units. Importantly
there is a theme of implementation about this book; a sort of how to guide. So
there are some examples of how to create digital soil maps of both continuous
and categorical target variable data, given available points and a portfolio of
available covariates. The procedural detail is explained and implemented using the
R computing language. Subsequently, some effort is required to become literate in
this programming language, both for general purpose usage and for DSM and other
related soil studies. With a few exceptions, all the data that is used in this book
to demonstrate methods, together with additional functions are provided via the R
package: ithir. This package can be downloaded free of cost. Instructions for getting
this package are in the next chapter.
The motivation of the book then shifts to operational concerns and based around
real case-studies. For example, the book looks at how we might statistically validate
a digital soil map. Another operational study is that of digital soil assessment (Carre
et al. 2007). Digital soil assessment (DSA) is akin to the translation of digital
soil maps into decision making aids. These could be risk-based assessments, or
References 5
assessing threats to soil (erosion, decline of organic matter etc.), and assessing
soil functions. These type of assessments can not be easily derived from a digital
soil map alone, but require some form of post-processing inference. This could be
done with quantitative modeling and or a deep mechanistic understanding of the
assessment that needs to be made. A natural candidate in this realm of DSM is land
capability or agricultural enterprise suitability. A case study of this type of DSA is
demonstrated in this book. Specific topics of this book include:
1. Attainment of R literacy in general and for DSM.
2. Algorithmic development for soil science.
3. General GIS operations relevant to DSM.
4. Soil data preparation, examination and harmonization for DSM.
5. Quantitative functions for continuous and categorical (and combinations of
both) soil attribute modeling and mapping.
6. Quantifying digital soil map uncertainty.
7. Assessing the quality of digital soil maps.
8. Updating, harmonizing and disaggregating legacy soil mapping.
9. Digital soil assessment in terms of land suitability for agricultural enterprises.
10. Digital identification of soil homologues.
References
Bui E, Moran CJ (2003) A strategy to fill gaps in soil survey over large spatial extents: an example
from the Murray-Darling basin of Australia. Geoderma 111:21–41
Carre F, McBratney AB, Mayr T, Montanarella L (2007) Digital soil assessments: beyond DSM.
Geoderma 142(1–2):69–79
Hartemink AE, McBratney AB (2008) A soil science renaissance. Geoderma 148:123–129
Jenny H (1941) Factors of soil formation. McGraw-Hill, New York
Lagacherie P, McBratney AB (2006) Digital soil mapping: an introductory perspective, chapter 1.
In: Spatial soil information systems and spatial soil inference systems: perspectives for digital
soil mapping. Elsevier, Amsterdam, pp 3–22
Malone BP, Minasny B, Odgers NP, McBratney AB (2014) Using model averaging to combine soil
property rasters from legacy soil maps and from point data. Geoderma 232–234:34–44
Malone BP, Jha SK, Minasny AB, McBratney B (2016) Comparing regression-based digital soil
mapping and multiple-point geostatistics for the spatial extrapolation of soil data. Geoderma
262:243–253
McBratney AB, Mendonca Santos ML, Minasny B (2003) On digital soil mapping. Geoderma
117:3–52
Minasny B, McBratney AB (2010) Digital soil mapping: bridging research, environmental
application, and operation, chapter 34. In: Methodologies for global soil mapping. Springer,
Dordrecht, pp 429–425
Odgers NP, Libohova Z, Thompson JA (2012) Equal-area spline functions applied to a legacy
soil database to create weighted-means maps of soil organic carbon at a continental scale.
Georderma 189–190:153–163
Odgers NP, McBratney AB, Minasny B (2015) Digital soil property mapping and uncertainty
estimation using soil class probability rasters. Geoderma 237–238:190–198
Odgers NP, Sun W, McBratney AB, Minasny B, Clifford D (2014) Disaggregating and harmonising
soil map units through resampled classification trees. Geoderma 214–215:91–100
Chapter 2
R Literacy for Digital Soil Mapping
2.1 Objective
The immediate objective here is to skill up in data analytics and basic graphics
with R. The range of analysis that can be completed, and the types of graphics
that can be created in R is simply astounding. In addition to the wide variety of
functions available in the “base” packages that are installed with R, more than
4500 contributed packages are available for download, each with its own suite of
functions. Some individual packages are the subject of entire books.
For this chapter of the book and the later chapters that will deal with digital soil
mapping exercises, we will not be able to cover every type of analysis or plot that
R can be used for, or even every subtlety associated with each function covered in
this entire book. Given it’s inherent flexibility, R is difficult to master, as one may
be able to do with a stand-alone software. R is a software package one can only
increase their knowledge and fluency in. Meaning that, effectively, learning R is a
boundless pursuit of knowledge.
In a disclaimer of sorts, this introduction to R borrows many ideas, and structures
from the plethora of online materials that are freely available on the internet. It will
be worth your while to do a Google search from time-to-time if you get stuck—you
will be amazed to find how many other R users have had the same problems you
have or have had.
2.2 Introduction to R
2.2.1 R Overview and History
R is a software system for computations and graphics. According to the R FAQ
(http://cran.r-project.org/doc/FAQ/R-FAQ.html#R-Basics):
© Springer International Publishing Switzerland 2017
B.P. Malone et al., Using R for Digital Soil Mapping,
Progress in Soil Science, DOI 10.1007/978-3-319-44327-0_2
7
8 2 R Literacy for Digital Soil Mapping
It consists of a language plus a run-time environment with graphics, a debugger, access to
certain system functions, and the ability to run programs stored in script files.
R was originally developed in 1992 by Ross Ihaka and Robert Gentleman at
the University of Auckland (New Zealand). The R language is a dialect of the
S language which was developed by John Chambers at Bell Laboratories. This
software is currently maintained by the R Development Core Team, which consists
of more than a dozen people, and includes Ihaka, Gentleman, and Chambers.
Additionally, many other people have contributed code to R since it was first
released. The source code for R is available under the GNU General Public Licence,
meaning that users can modify, copy, and redistribute the software or derivatives, as
long as the modified source code is made available. R is regularly updated, however,
changes are usually not major.
2.2.2 Finding and Installing R
R is available for Windows, Mac, and Linux operating systems. Installation files
and instructions can be downloaded from the Comprehensive R Archive Network
(CRAN) site at http://cran.r-project.org/. Although the graphical user interface
(GUI) differs slightly across systems, the R commands do not.
2.2.3 Running R: GUI and Scripts
There are two basic ways to use R on your machine: through the GUI, where R
evaluates your code and returns results as you work, or by writing, saving, and then
running R script files. R script files (or scripts) are just text files that contain the same
types of R commands that you can submit to the GUI. Scripts can be submitted to
R using the Windows command prompt, other shells, batch files, or the R GUI. All
the code covered in this book is or is able to be saved in a script file, which then
can be submitted to R. Working directly in the R GUI is great for the early stages of
code development, where much experimentation and trial-and-error occurs. For any
code that you want to save, rerun, and modify, you should consider working with R
scripts.
So, how do you work with scripts? Any simple text editor works—you just need
to save text in the ASCII format i.e., “unformatted” text. You can save your scripts
and either call them up using the command source (“file_name.R”) in the
R GUI, or, if you are using a shell (e.g., Windows command prompt) then type
R CMD BATCH file_name.R. The Windows and Mac versions of the R GUI
comes with a basic script editor, shown below in Fig. 2.1.
Unfortunately, this editor is not very good by reason that the Windows version
does not have syntax highlighting.
2.2 Introduction to R 9
Fig. 2.1 R GUI, its basic script editor, and plot window
There are some useful (in most cases, free) text editors available that can be
set up with R syntax highlighting and other features. TINN-R is a free text editor
http://nbcgib.uesc.br/lec/software/des/editores/tinn-r/en that is designed specifically
for working with R script files. Notepad++ is a general purpose text editor, but
includes syntax highlighting and the ability to send code directly to R with the
NppToR plugin. A list of text editors that work well with R can be found at: http://
www.sciviews.org/_rgui/projects/Editors.html.
2.2.4 RStudio
RStudio http://www.rstudio.com/ is an integrated development environment (IDE)
for R that runs on Linux, Windows and Mac OS X. We will be using this IDE during
the book, generally because it is very well designed, intuitively organized, and quite
stable.
When you first launch RStudio, you will be greeted by an interface that will look
similar to that in Fig. 2.2.
The frame on the upper right contains the workspace (where you will be able see
all your R objects), as well of a history of the commands that you have previously
entered. Any plots that you generate will show up in the region in the lower right
10 2 R Literacy for Digital Soil Mapping
Fig. 2.2 The RStudio IDE
corner. Also in this region is various help documentation, plus information and
documentation regarding what packages and function are currently available to use.
The frame on the left is where the action happens. This is the R console. Every
time you launch RStudio, it will have the same text at the top of the console
telling you the version that is being used. Below that information is the prompt.
As the name suggests, this is where you enter commands into R. So lets enter some
commands.
2.2.5 R Basics: Commands, Expressions, Assignments,
Operators, Objects
Before we start anything, it is good to get into the habit of making scripts of our
work. With RStudio launched go the File menu, then new, and R Script. A new
blank window will open on the top left panel. Here you can enter your R prompts.
For example, type the following: 1+1. Now roll your pointer over the top of the
panel to the right pointing green arrow (first one), which is a button for running the
2.2 Introduction to R 11
line of code down to the R console. Click this button and R will evaluate it. In the
console you should see something like the following:
1 + 1
## [1] 2
You could have just entered the command directly into the prompt and gotten the
same result. Try it now for yourself. You will notice a couple of things about this
code. The  character is the prompt that will always be present in the GUI. The
line following the command starts with a [1], which is simply the position of the
adjacent element in the output—this will make some sense later.
For the above command, the result is printed to the screen and lost—there is no
assignment involved. In order to do anything other than the simplest analyses, you
must be able to store and recall data. In R, you can assign the results of commands to
symbolic variables (as in other computer languages) using the assignment operator
-. Note that other computer scripting languages often use the equals sign (=) as
the assignment operator. When a command is used for assignment, the result is no
longer printed to the GUI console.
x - 1 + 1
x
## [1] 2
Note that this is very different from:
x  -1 + 1
## [1] FALSE
In this case, putting a space between the two characters that make up the
assignment operator causes R to interpret the command as an expression that ask
if x is less than zero. However spaces usually do not matter in R, as long as they do
not separate a single operator or a variable name. This, for example, is fine:
x - 1
Note that you can recall a previous command in the R GUI by hitting the up
arrow on your keyboard. This becomes handy when you are debugging code.
When you give R an assignment, such as the one above, the object referred to as
x is stored into the R workspace. You can see what is stored in the workspace by
looking to the workspace panel in RStudio (top right panel). Alternatively, you can
use the ls function.
ls()
## [1] x
12 2 R Literacy for Digital Soil Mapping
To remove objects from your workspace, use rm.
rm(x)
x
As you can see, You will get an error if you try to evaluate what x is.
If you want to assign the same value to several symbolic variables, you can use
the following syntax.
x - y - z - 1
ls()
## [1] x y z
R is a case-sensitive language. This is true for symbolic variable names, function
names, and everything else in R.
x - 1 + 1
x
X
In R, commands can be separated by moving onto a new line (i.e., hitting enter)
or by typing a semicolon (;), which can be handy in scripts for condensing code. If
a command is not completed in one line (by design or error), the typical R prompt
 is replaced with a +.
x-
+ 1+1
There are several operators that are used in the R language. Some of the more
common are listed below.
Arithmetic
+ - * / ˆ plus, minus, multiply, divide, power
Relational
a == b a is equal to b (do not confuse with =)
a != b a is not equal to b
a  b a is less than b
a  b a is greater than b
a = b a is less than or equal to b
a = b a is greater than or equal to b
Logical/grouping
! not
 and
| or
2.2 Introduction to R 13
Indexing
$ part of a data frame
[] part of a data frame, array, list
[[]] part of a list
Grouping commands
{} specifying a function, for loop, if statement etc.
Making sequences
a:b returns the sequence a, a+1, a+2, . . . b
Others
# commenting (very very useful!)
; alternative for separating commands
~ model formula specification
() order of operations, function arguments
Commands in R operate on objects, which can be thought of as anything that can
be assigned to a symbolic variable. Objects include vectors, matrices, factors, lists,
data frames, and functions. Excluding functions, these objects are also referred to
as data structures or data objects.
When you want to finish up on an R session, RSudio will ask you if you want to
“save workspace image”. This refers to the workspace that you have created , i.e.,
all the objects you have created or even loaded. It is generally good practice to save
your workspace after each session. More importantly however, is the need to save
all the commands that you have created on your script file. Saving a script file in
Rstudio is just like saving a Word document. Give both a go—save the script file
and then save the workspace. You can then close RStudio.
2.2.6 R Data Types
The term “data type” refers to the type of data that is present in a data structure, and
does not describe the data structure itself. There are four common types of data in R:
numerical, character, logical, and complex numbers. These are referred to as modes
and are shown below:
Numerical data
x - 10.2
x
## [1] 10.2
14 2 R Literacy for Digital Soil Mapping
Character data
name - John Doe
name
## [1] John Doe
Any time character data are entered in the R GUI, you must surround individual
elements with quotes. Otherwise, R will look for an object.
name - John
## Error in eval(expr, envir, enclos): object ’John’ not found
Either single or double quotes can be used in R. When character data are read
into R from a file, the quotes are not necessary.
Logical data contain only three values: TRUE, FALSE, or NA, (NA indicates a
missing value—more on this later). R will also recognize T and F, (for true and
false respectively), but these are not reserved, and can therefore be overwritten by
the user, and it is therefore good to avoid using these shortened terms.
a - TRUE
a
## [1] TRUE
Note that there are no quotes around the logical values—this would make them
character data. R will return logical data for any relational expression submitted to
it.
4  2
## [1] FALSE
or
b - 4  2
b
## [1] FALSE
And finally, complex numbers, which will not be covered in this book, are the
final data type in R
cnum1 - 10 + (0+3i)
cnum1
## [1] 10+3i
You can use the mode or class function to see what type of data is stored in
any symbolic variable.
2.2 Introduction to R 15
class(name)
## [1] character
class(a)
## [1] logical
class(x)
## [1] numeric
mode(x)
## [1] numeric
2.2.7 R Data Structures
Data in R are stored in data structures (also known as data objects)—these are and
will be the that you perform calculations on, plot data from, etc. Data structures in
R include vectors, matrices, arrays, data frames, lists, and factors. In a following
section we will learn how to make use of these different data structures. The
examples below simply give you an idea of their structure.
Vectors are perhaps the most important type of data structure in R. A vector is
simply an ordered collection of elements (e.g., individual numbers).
x - 1:12
x
## [1] 1 2 3 4 5 6 7 8 9 10 11 12
Matrices are similar to vectors, but have two dimensions.
X - matrix(1:12, nrow = 3)
X
## [,1] [,2] [,3] [,4]
## [1,] 1 4 7 10
## [2,] 2 5 8 11
## [3,] 3 6 9 12
Arrays are similar to matrices, but can have more than two dimensions.
Y - array(1:30, dim = c(2, 5, 3))
Y
## , , 1
##
## [,1] [,2] [,3] [,4] [,5]
16 2 R Literacy for Digital Soil Mapping
## [1,] 1 3 5 7 9
## [2,] 2 4 6 8 10
##
## , , 2
##
## [,1] [,2] [,3] [,4] [,5]
## [1,] 11 13 15 17 19
## [2,] 12 14 16 18 20
##
## , , 3
##
## [,1] [,2] [,3] [,4] [,5]
## [1,] 21 23 25 27 29
## [2,] 22 24 26 28 30
One feature that is shared for vectors, matrices, and arrays is that they can only
store one type of data at once, be it numerical, character, or logical. Technically
speaking, these data structures can only contain elements of the same mode.
Data frames are similar to matrices—they are two-dimensional. However, a data
frame can contain columns with different modes. Data frames are similar to data
sets used in other statistical programs: each column represents some variable, and
each row usually represents an “observation”, or “record”, or “experimental unit”.
dat - (data.frame(profile_id = c(Chromosol, Vertosol, Sodosol),
FID = c(a1, a10, a11), easting = c(337859, 344059, 347034),
northing = c(6372415, 6376715, 6372740), visited = c(TRUE, FALSE, TRUE)))
dat
## profile_id FID easting northing visited
## 1 Chromosol a1 337859 6372415 TRUE
## 2 Vertosol a10 344059 6376715 FALSE
## 3 Sodosol a11 347034 6372740 TRUE
Lists are similar to vectors, in that they are an ordered collection of elements, but
with lists, the elements can be other data objects (the elements can even be other
lists). Lists are important in the output from many different functions. In the code
below, the variables defined above are used to form a list.
summary.1 - list(1.2, x, Y, dat)
summary.1
## [[1]]
## [1] 1.2
##
## [[2]]
## [1] 1 2 3 4 5 6 7 8 9 10 11 12
##
## [[3]]
## , , 1
##
2.2 Introduction to R 17
## [,1] [,2] [,3] [,4] [,5]
## [1,] 1 3 5 7 9
## [2,] 2 4 6 8 10
##
## , , 2
##
## [,1] [,2] [,3] [,4] [,5]
## [1,] 11 13 15 17 19
## [2,] 12 14 16 18 20
##
## , , 3
##
## [,1] [,2] [,3] [,4] [,5]
## [1,] 21 23 25 27 29
## [2,] 22 24 26 28 30
##
##
## [[4]]
## profile_id FID easting northing visited
## 1 Chromosol a1 337859 6372415 TRUE
## 2 Vertosol a10 344059 6376715 FALSE
## 3 Sodosol a11 347034 6372740 TRUE
Note that a particular data structure need not contain data to exist. This may seem
unusual, but it can be useful when it is necessary to set up an object for holding some
data later on.
x - NULL
2.2.8 Missing, Indefinite, and Infinite Values
Real data sets often contain missing values. R uses the marker NA (for “not
available”) to indicate a missing value. Any operation carried out on an NA will
return NA.
x - NA
x - 2
## [1] NA
Note that the NA used in R does not have the quotes around it—this would make
it character data. To determine if a value is missing, use the is.na—this function
can also be used to set elements in a data object to NA.
is.na(x)
## [1] TRUE
18 2 R Literacy for Digital Soil Mapping
!is.na(x)
## [1] FALSE
Indefinite values are indicated with the marker NaN, for “not a number”. Infinite
values are indicated with the markers Inf or -Inf. You can find these values with
the functions is.infinite, is.finite, and is.nan.
2.2.9 Functions, Arguments, and Packages
In R, you can carry out complicated and tedious procedures using functions.
Functions require arguments, which include the object(s) that the function should act
upon. For example, the function sum will calculate the sum of all of its arguments.
sum(1, 12.5, 3.33, 5, 88)
## [1] 109.83
The arguments in (most) R functions can be named, i.e., by typing the name of
the argument, an equal sign, and the argument value (arguments specified in this
way are also called tagged). For example, for the function plot, the help file lists
the following arguments.
plot (x, y,...)
Therefore, we can call up this function with the following code.
a - 1:10
b - a
plot(x = a, y = b)
With names arguments, R recognizes the argument keyword (e.g., x or y) and
assigns the given object (e.g., a or b above) to the correct argument. When using
names arguments, the order of the arguments does not matter. We can also use what
are called positional arguments, where R determines the meaning of the arguments
based on their position.
plot(a, b)
This code does the same as the previous code. The expected position of
arguments can be found in the help file for the function you are working with or
by asking R to list the arguments using the args function.
args(plot)
## function (x, y, ...)
## NULL
2.2 Introduction to R 19
It usually makes sense to use the positional arguments for only the first few
arguments in a function. After that, named arguments are easier to keep track of.
Many functions also have default argument values that will be used if values are not
specified in the function call. These default argument values can be seen by using
the args function and can also be found in the help files. For example, for the
function rnorm, the arguments mean and sd have default values.
args(rnorm)
## function (n, mean = 0, sd = 1)
## NULL
Any time you want to call up a function, you must include parentheses after it,
even if you are not specifying any arguments. If you do not include parentheses, R
will return the function code (which at times might actually be useful).
Note that it is not necessary to use explicit numerical values as function
arguments—symbolic variable names which represent appropriate data structure
can be used. it is also possible to use functions as arguments within functions. R will
evaluate such expressions from the inside outward. While this may seem trivial, this
quality makes R very flexible. There is no explicit limit to the degree of nesting that
can be used. You could use:
plot(rnorm(10, sqrt(mean(c(1:5, 7, 1, 8, sum(8.4, 1.2, 7))))), 1:10)
The above code includes 5 levels of nesting (the sum of 8.4,1.2 and 7 is combined
with the other values to form a vector, for which the mean is calculated, then the
square root of this value is taken and used as the standard deviation in a call to
rnorm, and the output of this call is plotted). Of course, it is often easier to assign
intermediate steps to symbolic variables. R evaluates nested expressions based on
the values that functions return or the data represented by symbolic variables. For
example, if a function expects character data for a particular argument, then you can
use a call to the function paste in place of explicit character data.
Many functions (including sum, plot, and rnorm) come with the R “base
packages”, i.e., they are loaded and ready to go as soon as you open R. These
packages contain the most common functions. While the base packages include
many useful functions, for specialized procedures, you should check out the content
that is available in the add-on packages. The CRAN website currently lists more
than 4500 contributed packages that contain functions and data that users have
contributed. You can find a list of the available packages at the CRAN website http://
cran.r-project.org/. During the course of this book and described in more detail later
on, we will be looking and using a number of specialized packages for application
of DSM. Another repository of R packages is the R-Forge website https://r-forge.r-
project.org/. R-Forge offers a central platform for the development of R packages,
R-related software and further projects. Packages in R-Forge are not necessarily
always on the CRAN website. However, many packages on the CRAN website
are developed in R-Forge as ongoing projects. Sometimes to get the latest changes
20 2 R Literacy for Digital Soil Mapping
made upon a package, it pays to visit R-Forge first, as the uploading of the revised
functions to CRAN is not instantaneous.
To utilize the functions in contributed R packages, you first need to install
and then load the package. Packages can be installed via the packages menu
in the right bottom panel of RStudio (select the “packages” menu, then “install
packages”). Installation could be retrieved from the nearest mirror site (CRAN
server location)—you will need to have first selected this by going to the tools, then
options, then packages menu where you can then select the nearest mirror site from a
suite of possibles. Alternatively, you may just install a package from a local zip file.
This is fine, but often when using a package, there are other peripheral packages (or
dependencies) that also need to be loaded (and installed). If you install the package
from CRAN or a mirror site, the dependency packages are also installed. This is
not the case when you are installing packages from zip files—you will also have to
manually install all the dependencies too.
Or just use the command:
install.packages(package name)
where “package name” should be replaced with the actual name of the package
you want to install, for example:
install.packages(Cubist)
This command will install the package of functions for running the Cubist rule-
based machine learning models for regression.
Installation is a one-time process, but packages must be loaded each time you
want to use them. This is very simple, e.g., to load the package Cubist, use the
following command.
library(Cubist)
Similarly, if you want to install an R package from R-Forge (another popular
hosting repository for R packages) you would use the following command:
install.packages(package name, repos = http://R-Forge.R-project.org)
Other popular repositories for R packages include Github and BitBucket. These
repositories as well as R-Forge are version control systems that provide a central
place for people to collaborate on everything from small to very large projects with
speed and efficiency. The companion R package to this book, ithir is hosted on
Bitbucket for example. ithir contains most of the data, and some important functions
that are covered in this book so that users can replicate all of the analyses contained
within. ithir can be downloaded and installed on your computer using the following
commands:
library(devtools)
install_bitbucket(brendo1001/ithir/pkg)
library(ithir)
2.2 Introduction to R 21
The above commands assumes your have already installed the devtools
package. Any package that you want to use that is not included as one of the “base”
packages, needs to be loaded every time you start R. Alternatively, you can add code
to the file Rprofile.site that will be executed every time you start R.
You can find information on specific packages through CRAN, by browsing
to http://cran.r-project.org/ and selecting the packages link. Each package has a
separate web page, which will include links to source code, and a pdf manual. In
RStudio, you can select the packages tab on the lower right panel. You will then see
all the package that are currently installed in your R environment. By clicking onto
any package, information on the various functions contained in the package, plus
documentation and manuals for their usage. It becomes quite clear that within this
RStudio environment, there is at your fingertips, a wealth of information for which
to consult whenever you get stuck. When working with a new package, it is a good
idea to read the manual.
To “unload” functions, use the detach function:
detach(package:Cubist)
For tasks that you repeat, but which have no associated function in R, or if you
do not like the functions that are available, you can write your own functions. This
will be covered a little a bit later on. Perhaps one day you may be able to compile
all your functions that you have created into a R package for everyone else to use.
2.2.10 Getting Help
It is usually easy to find the answer about specific functions or about R in general.
There are several good introductory books on R. For example, “R for Dummies”,
which has had many positive reviews http://www.amazon.com/R-Dummies-Joris-
Meys/dp/1119962846.You can also find free detailed manuals on the CRAN web-
site. Also, it helps to keep a copy of the “R Reference Card”, which demonstrates
the use of many common functions and operators in 4 pages http://cran.r-project.
org/doc/contrib/Short-refcard.pdf. Often a Google search https://www.google.com.
au/ of your problem can be a very helpful and fruitful exercise. To limit the results to
R related pages, adding “cran” generally works well. R even has an internet search
engine of sorts called rseek, which can be found at http://rseek.org/—it is really just
like the Google search engine, but just for R stuff!
Each function in R has a help file associated with it that explains the syntax and
usually includes an example. Help files are concisely written. You can bring up a
help file by typing ? and then the function name.
?cubist
This will bring up the help file for the cubist function in the help panel of
RStudio. But, what if you are not sure what function you need for a particular
task? How can you know what help file to open? In addition to the sources given
Other documents randomly have
different content
together all right and are happy, and then wake up and find that’s a
dream, and you’re in jail for murder and can’t never get out alive.
“Then they proved about how the poker just fit into the place in her
head, and how it was took back into the kitchen and put into the
ashes again, so ‘twouldn’t show, and how far I drove that day, and
ever’ saloon I stopped into on the way, and just how much I drank,
and ever’thing I done, except the beefsteak I bought and that half
peck of potatoes that I gave away to the old lady. Then they proved
all about my runnin’ away, and where I’d been, and what I’d done,
and my changin’ my name, and the way I was caught.
“A good many times my lawyer objected to something that they tried
to prove, or to something that the other feller was sayin’, but ever’
time the judge decided ‘gainst my lawyer, and he ‘most always
seemed kind of mad when my lawyer said anything. The other one
was a good deal the smartest; ever’one said he wanted to be a
judge, and he took all the murder cases he could get, and they
called him the ‘hangin’ lawyer,’ because ever’one he had anything to
do with got hung.
“There was always a big crowd in the court room ever’ day, and a lot
of people waitin’ outside to get in, and there was always some
awfully nice dressed ladies settin’ up there with the judge ever’ day,
and they had a sort of glass in their hands, and they’d hold it up in
front of their eyes and look at me through the glass just like the
judge looked at the paper.
“It took about two days for their side to call all the witnesses they
had, and finally their lawyer got up just as solemn and said that was
their case.
“Then the judge give them a few minutes recess for ever’body to
walk around a little, and ever’one looked at me, just as they’d done
all the time. When they come to order the judge told us to go on
with our side. My lawyer turned to me and said he didn’t see what
use it was to prove anything, and we might just as well let the case
go the way it was. I said I ought to go on the stand and tell about
that paper, and how it was nothin’ but the one that come around the
beef, and he said they wouldn’t believe me if I said it. And anyhow it
wouldn’t make any difference. If I once got on the stand they’d get
me all mixed up and the first thing I knew I’d tell ‘em all about
ever’thing, and so far as witnesses went he couldn’t find anyone to
do me any good.
“I thought ‘twould look pretty bad not to give any evidence at all,
and he said he knew that but ‘twould look a mighty sight worse if we
put any in. So my lawyer got up and ever’one watched to see what
he was goin’ to do, and then he just said ‘May it please the court, we
have concluded not to put in any evidence.’ And ever’one
commenced to whisper, and to look at me, and to look ‘round, and
the judge looked queer and kind of satisfied, and said then if there
was no evidence on our side they would take a recess till mornin’
when they could argue the case. Of course, after I went back to the
cell and got to thinkin’ it over I could see that it was all off more’n
ever, but I didn’t see that the lawyer could have done any different.”
Here Jim got up and went to the grating and called to the guard.
“I’m gettin’ a little tired and fagged out and it ain’t worth while to go
to bed. Won’t you just give me some more whiskey?”
The guard came up to the door. “Of course, you can have all the
whiskey you want,” he said. “Here’s a bottle I’ve just fetched up from
the office. You’d better drink that up and then I’ll get you some
more.”
Jim took a long drink at the bottle, and then passed it to his friend.
Hank was glad to have something to help him through the ordeal,
which had been hard for him to bear.
Presently the guard came back to the grating and asked Jim what he
wanted for breakfast.
“It ain’t breakfast time yet, is it?” Jim gasped.
“No, but I’m going to the office after a while and I want to give the
order when I go. You’d better tell me now. You can have ‘most
anything you want. You can have ham and eggs, or bacon or steak,
and tea or coffee, and bread and butter and cakes; or all of ‘em—or
anything else you want.”
“Well, I guess you’d better bring me ham and eggs. I don’t seem to
care for steak, and I don’t think I want any coffee. I’d rather have a
cocktail. You’d better bring me plenty more whiskey too when you
come. You know I hain’t slept any and I’m kind of nervous. I guess
it’ll be better if I don’t know much about it; don’t you?”
“Sure thing,” the guard answered back. “We’ve got some Scotch
whiskey over there that’s all right. I’ll bring you some of that. All the
boys takes that. I don’t think you’ll be troubled much after a good
drink of that Scotch. I guess you’d better hurry up a little bit with
what you want to say. I don’t like to hurry you any, but I’m afraid
they’ll be along with the breakfast after while, and they don’t allow
any visitors after that.”
The guard turned to leave, but before he had gone far, Jim called
out, “You’d better telephone over to the telegraph office, hadn’t you?
Somethin’ might have come maybe.”
“All right, I’ll do that,” the guard answered back, “and Jim, I guess
you might as well put on them new clothes before breakfast; they’ll
look better’n the old ones—to eat in.”
X
im drank the remnant of whiskey in the bottle he was
holding, draining it to the last drop. As he sat in his
chair he leaned against the side of the cell.
“My—how many bottles of this stuff I’ve drunk tonight.
It’s a wonder I ain’t dead already. I don’t believe I could keep up
only I’ve got to finish my story. But this cell begins to swim ‘round
pretty lively; I guess it ain’t goin’ to take much to finish me. Think a
little of that Scotch will just about do the job. I don’t care what
anyone says, I’m goin’ to get just as drunk as I can. I sha’n’t live to
see what they say in the newspapers and it won’t make any
difference when I’m dead. I don’t know as I ought to eat anything; it
might kind of keep it from actin’, but still I might as well. I guess the
Scotch’ll do it all right anyway.
“Well, there ain’t very much more to tell, and I guess you’re glad.
It’s been a tough night on you, poor feller. I hope no one’ll ever have
to do it for you. But, say—you’ve done me lots of good! I don’t know
how I’d put in the night, if you hadn’t come!
“Well—the last mornin’ they took me over to court, the room was
jammed more’n ever before, and a big crowd was waitin’ outside. I
heard the other lawyer say that the judge’s platform looked like a
reception; anyhow it was full of ladies with perfectly grand clothes,
and most of ‘em would hold their glasses up to look at me. The
other lawyer didn’t say much in his first speech, only to tell how it
was all done, and how they had proved that everything happened in
Cook County, and what a high office the jury had.
“Then my lawyer talked for me. I didn’t really see how he could have
done any better and the papers all said he done fine. Of course
there wa’n’t much to say. I done it, and what more was there to it?
And yet I s’pose a lawyer is educated so he can talk all right on
either side. Well, my lawyer went on to make out that no one had
seen it done, that the evidence was all circumstantial, and no one
ever ought to be hung on circumstantial evidence. He went on to
show how many mistakes had been made on circumstantial
evidence, and he told about a lot of cases. He told the jury about
one that I think happened in Vermont where two farmers was seen
goin’ out in the field. They hadn’t been very good friends for a long
time. Someone heard loud voices and knew they was fightin’. Finally
one of ‘em never come back and afterwards some bones or
somethin’ was found, that the doctors said was a farmer’s bones.
Well, they tried that farmer and found him guilty, and hung him. And
then years afterwards the other man come back. And he’d just
wandered off in a crazy fit. And after a while another doctor found
out that them bones was only sheep bones, and they’d hung an
innocent man. He told a lot of stories of that kind, and some of the
jury seemed to cry when he told ‘em, but I guess they was cryin’ for
the Vermont man and not for me.
“After my lawyer got through the other lawyer had one more
chance, and he was awful hard on me. He made out that I was the
worst man that ever lived. He claimed that I had made up my mind
to kill her long ago, just to get rid of her, and that I went ‘round to
all the saloons that day and drank just to get up my nerve. Then he
claimed that I took a bottle of whiskey home and drank it up and left
the empty bottle on the table, and I took that just to nerve me up.
He made more out of the brown paper than he did of anything else,
and told how I burned all the rest of the evidence but had forgot to
burn this, and how I’d gone into the kitchen and got the poker out
of the stove and come back into the settin’-room and killed her, and
then took it back; and how cold-blooded I was to take her, after I’d
killed her, and go and dump her into that hole away out on the
prairie, and how I’d run away, and how that proved I’d killed her,
and then he compared me with all the murderers who ever lived
since Cain, ‘most, and showed how all of ‘em was better’n I was,
and told the jury that nobody in Chicago would be safe unless I was
hung; and if they done their duty and hung me there wouldn’t be
any more killin’ in Chicago after this. I can’t begin to tell you what all
he said; but it was awful! Once in a while when it was too bad, my
lawyer would interrupt, but the judge always decided against me
and then the other lawyer went on worse’n before. The papers next
day told how fast I changed color while he was talkin’, and what a
great speech he made, and they all said he ought to be a judge
because he was so fearless.
“It took the crowd some time to quiet down after he got through
and then the judge asked the jury to stand up, and they stood up,
and he read a lot of stuff to ‘em, tellin’ ‘em about the case. ‘Most all
that he read was ‘gainst me. Sometimes I thought he was readin’
one on my side, and he told ‘em how sure they must be before they
could convict, and then he’d wind up by sayin’ they must be sure it
was done in Cook County. Of course there never was any doubt but
what it all happened in Cook County. When the judge got through
‘twas most night, and he told the bailiff to take charge of the jury, so
he took ‘em and the clothes and the brown paper with the blood out
in the jury room, and they han’-cuffed me and took me back to my
cell.
“I don’t believe I ever put in any night that was quite so hard on me
—exceptin’ mebbe the night I done it—as that one when the jury
was out. I guess ever’one thought they wouldn’t stay long. I couldn’t
see that any of ‘em ever looked at me once as if they cared whether
I lived or died. I don’t believe that they really thought I was a man
like them; anyhow ever’-one thought they would sentence me to
hang in just a few minutes. I s’posed myself that they’d be in before
supper. My lawyer come over to the jail with me, because he knew
how I felt. And anyhow he was ‘most as nervous as I was. After a
while they brought me in my supper, and the lawyer went out to get
his. Then the guard told me the jury had gone to supper, and he
guessed there was some hitch about it, though ever’one thought the
jury wouldn’t be out long. After a while the lawyer came back, and
he stayed and talked to me until nine or ten o’clock, and the jury
didn’t come in, so he went to see what was the matter, and come
back and said he couldn’t find out anything, only that they hadn’t
agreed.
“Well, he stayed till twelve o’clock, and then the judge went home,
and we knew they wa’n’t goin’ to come in till mornin’. I couldn’t
sleep that night, but walked back and forth in the cell a good bit of
the time. You see it wa’n’t this cell. The one I had then was a little
bigger. I’d lay down once in a while, and sometimes I’d smoke a
cigar that the guard gave me. Anyhow I couldn’t really sleep, and
was mighty glad when daylight come. In the mornin’, kind of early, I
heard that jury had agreed and I knew that ‘twas bad for me. The
best that could happen would be a disagreement. I hadn’t allowed
myself to have much hope any of the time, but I knew that now it
was all off.
“Still I waited and didn’t quite give up till they took me back to the
courtroom. Then when ever’one had got their places the jury come
in, lookin’ awful solemn, and the judge looked sober and fierce-like,
and he said, ‘Gentlemen of the Jury, have you agreed on your
verdict?’ And the foreman got up and said, ‘We have.’ Then the
judge told the foreman to give the verdict to the clerk. He walked
over to the row of chairs and the man at the end of the bottom row
reached out his hand and gave the paper to him. The people in the
room was still as death. Then the clerk read, ‘We, the jury, find the
defendant guilty, and sentence him to death.’ I set with my head
down, lookin’ at the paper; I expected it, and made up my mind not
to move. Ever’one in the courtroom sort of give a sigh. I never
looked up, and I don’t believe I moved. The papers next day said I
was brazen and had no feelin’, even when the jury sentenced me to
death.
“The judge was the first one to speak. He turned to the jury and
thanked ‘em for their patriotism and devotion, and the great courage
they’d shown by their verdict. He said they’d done their duty well
and could now go back to their homes contented and happy. And he
says: ‘Mr. Sheriff, remove the prisoner from the room.’ Of course, I
hadn’t expected nothin’, and still I wa’n’t quite sure—the same as
now, when I think mebbe the governor’ll change his mind. But when
the verdict was read and they said it was death, somehow I felt kind
of dazed. I don’t really remember their puttin’ the han’-cuffs on me,
and takin’ me back to jail. I don’t remember the crowd in the
courtroom, or much of anything until I was locked up again, and
then my lawyer come and said he would make a motion for a new
trial, and not to give up hope. My lawyer told me that the reason
they was out so long was one man stuck out for sendin’ me to the
penitentiary for life instead of hangin’ me. We found out that he
used to be a switchman. I s’pose he knew what a hard life I had and
wanted to make some allowances. The State’s Attorney said he’d
been bribed, and the newspapers had lots to say about investigatin’
the case, but there wa’n’t nothin’ done about it. But I s’pose mebbe
it had some effect on the next case.
“There wa’n’t nothin’ more done for two or three days. I just stayed
in my cell and didn’t feel much like talkin’ with anyone. Then my
lawyer come over and said the motion for a new trial would be heard
next day. In the mornin’ they han’cuffed me and took me back as
usual. There was a lot of people in the courtroom, though not so
many as before. My lawyer had a lot of books, and he talked a long
while about the case, and told the judge he ought to give me a new
trial on account of all the mistakes that was made before. And after
he got done the judge said he’d thought of this case a great deal
both by day and by night, and he’d tried to find a way not to
sentence me to death, but he couldn’t do it, and the motion would
be overruled. Then he said, ‘Jackson, stand up.’ Of course I got up,
because he told me to. Then he looked at me awful savage and
solemn and said, ‘Have you got anything to say why sentence should
not be passed on you?’ and I said ‘No!’ Then he talked for a long
time about how awful bad I was, and what a warnin’ I ought to be
to ever’body else; and then he sentenced me to be removed to the
county-jail and on Friday, the thirteenth day of this month—that’s
today—to be hanged by the neck till dead, and then he said, ‘May
God have mercy on your soul!’ After that he said, ‘Mr. Sheriff, remove
the prisoner. Mr. Clerk, call the next case.’ And they han’-cuffed me
and brought me back.
“I don’t know why the judge said, ‘May God have mercy on your
soul!’ I guess it was only a kind of form that they have to go
through, and I don’t think he meant it, or even thought anything
about it. If he had, I don’t see how he really could ask God to have
mercy on me unless he could have mercy himself. The judge didn’t
have to hang me unless he wanted to.
“Well, the lawyer come in and told me he ought to appeal the case
to the Supreme Court, but it would cost one hundred dollars for a
record, and he didn’t know where to get the money. I told him I
didn’t know either. Of course I hadn’t any and told him he might just
as well let it go; that I didn’t s’pose it would do any good anyhow.
But he said he’d see if he could find the money somehow and the
next day he come in and said he was goin’ to give half out of his
own pocket, and he’d seen another feller that didn’t want his name
mentioned and that thought a man oughtn’t to be hung without a
chance; he was goin’ to give the other half. Of course I felt better
then, but still I thought there wa’n’t much chance, for ever’body was
against me, but my lawyer told me there was a lot of mistakes and
errors in the trial and I ought to win.
“Well, he worked on the record and finally got it finished, a great big
kind of book that told all about the case. It was only finished a week
ago, and I s’posed anyone could take his case to the Supreme Court
if he had the money; but my lawyer said no, he couldn’t, or rather
he said yes, anyone could take his case to the Supreme Court, but in
a case like mine, where I was to be hung I’d be dead before the
Supreme Court ever decided it, or even before it was tried. Then he
said the only way would be if some of the judges looked at the
record and made an order that I shouldn’t be hung until after they’d
tried the case, but he told me it didn’t make any difference how
many mistakes the judge had made, or how many errors there was,
they wouldn’t make any order unless they believed I hadn’t done it.
He said that if it had been a dispute about a horse or a cow, or a
hundred dollars, I’d have a right to go to the Supreme Court, and if
the judges found any mistakes in the trial I’d have another chance.
But it wa’n’t so when I was tried for my life.
“Well, when he’d explained this I felt sure ‘twas all off, and I told him
so, but he said he was goin’ to make the best fight he could and not
give up till the end. He said he had a lot at stake himself, though not
so much as I had. So he took the record and went to the judges of
the Supreme Court and they looked it over, and said mebbe the
judge that tried me did make some mistakes, and mebbe I didn’t
have a fair trial, but it looked as if I was guilty and they wouldn’t
make any order. So my case never got into the Supreme Court after
all and the hundred dollars was wasted.
“Well, when my lawyer told me, of course I felt blue. I’d built some
on this, and it begun to look pretty bad. It seemed as if things was
comin’ along mighty fast, and it looked as if the bobbin was ‘most
wound up. When you know you’re going to die in a week the time
don’t seem long. Of course if a feller’s real sick, and gets run down
and discouraged, and hasn’t got much grip on things, he may not
feel so very bad about dyin’, for he’s ‘most dead anyway, but when a
feller’s strong, and in good health, and he knows he’s got to die in a
week, it’s a different thing.
“Then my lawyer said there was only one thing left, and that was to
go to the gov’nor. He said he knew the gov’nor pretty well and he
was goin’ to try. He thought mebbe he’d change the sentence to
imprisonment for life. When I first come to jail I said I’d rather be
hung than to be sent up for life, and I stuck to it even when the jury
brought in their verdict, but when it was only a week away I begun
to feel different, and I didn’t want to die, leastwise I didn’t want to
get hung. So I told him all the people I knew, though I didn’t think
they’d help me, for the world seemed to be against me, and the
papers kept tellin’ what a good thing it was to hang me, and how
the State’s Attorney and the jury and the judge had been awful
brave to do it so quick. But I couldn’t see where there was any
bravery in it. I didn’t have no friends. It might have been right, but I
can’t see where the brave part come in.
“But every day the lawyer said he thought the gov’nor would do
somethin’, and finally he got all the names he could to the petition,
and I guess it wa’n’t very many, only the people that sign all the
petitions because they don’t believe in hangin’; and day before
yesterday, he went down to Springfield to see the gov’nor.
“Well, I waited all day yesterday. I didn’t go out of the cell for
exercise because I couldn’t do anything and I didn’t want ‘em to see
how nervous I was. But I tell you it’s ticklish business waitin’ all day
when you’re goin’ to be hung in the mornin’ unless somethin’
happens. I kep’ askin’ the guard what time ‘twas, and when I heard
anyone comin’ up this way I looked to see if it wa’n’t a despatch,
and I couldn’t set down or lay down, or do anything ‘cept drink
whiskey. I hain’t really been sober and clear-headed since yesterday
noon, in fact, I guess if I had been, I wouldn’t kep’ you here all night
like this. I didn’t hardly eat a thing, either, all day, and I asked the
guard about it a good many times, and he felt kind of sorry for me
but didn’t give me much encouragement. You see they’ve had a
guard right here in front of the door all the time, day and night, for
two weeks. That’s called the death watch, and they set here to see
that I don’t kill myself, though I can’t see why that would make any
great difference so long as I’ve got to die anyhow.
“Well, ‘long toward night the guard came and brought me that new
suit of clothes over on the bed, and I guess I’ve got to put ‘em on
pretty quick. Of course, the guard’s been as nice as he could be. He
didn’t tell me what they’s for, but I knew all the same. I know they
don’t hang nobody in their old clothes. I s’pose there’ll be a good
many people there, judges and doctors and ministers and lawyers,
and the newspapers, and the friends of the sheriff, and politicians,
and all, and of course it wouldn’t look right to have me hung up
there before ‘em all in my old clothes,—it would be about like
wearin’ old duds to a party or to church—so I’ve got to put on them
new ones. They’re pretty good, and they look as if they’re all wool,
don’t you think?
“Well, a little while after they brought me the clothes, I seen the
guard come up with a telegram in his hand. I could see in his face it
wa’n’t no use, so of course I wa’n’t quite so nervous when I read it.
But I opened it to make sure. The lawyer said that the gov’nor
wouldn’t do nothin’. Then, of course, ‘twas all off. Still he said he’d
go back about midnight. I don’t know whether he meant it, or said it
to brace me up a little and kind of let me down easier.
“Of course, the gov’nor could wake up in the night and do it, if he
wanted to, and I s’pose such things has been done. I’ve read ‘bout
‘em stoppin’ it after a man got up on the scaffold. You remember
about the gov’nor of Ohio, don’t you? He come here to Chicago to
some convention, and a man was to be hung in Columbus that day,
and the gov’nor forgot it till just about the time, and then he tried
for almost an hour to get the penitentiary on the long distance
telephone, and he finally got ‘em just as the man was goin’ up on
the scaffold. Such things has happened, but of course, I don’t s’pose
they’ll happen to me. I never had much luck in anything, and I
guess I’ll be hung all right.
“It seems queer, don’t it, how I’m talkin’ to you here, and the guard
out there, and ever’body good to me, and in just a little while they’re
goin’ to take me out there and hang me! I don’t believe I could do it,
even if I was a sheriff and got ten thousand dollars a year for it, but
I s’pose it has to be done.
“Well, now I guess I’ve told you all about how ever’thing happened
and you und’stand how it was. I s’pose you think I’m bad, and I
don’t want to excuse myself too much, or make out I’m any saint. I
know I never was, but you see how a feller gets into them things
when he ain’t much different from ever’body else. I know I don’t like
crime, and I don’t believe the other does. I just got into a sort of a
mill and here I am right close up to that noose.
“There ain’t anyone ‘specially that I’ve got to worry about, ‘cept the
boy. Of course it’s awful hard for a poor feller to start, anyhow,
unless he’s real smart, and I don’t know how ‘twill be with the boy.
We always thought he was awful cunnin’; but I s’pose most parents
does. But I don’t see how he’d ever be very smart, ‘cause I wa’n’t
and neither was his mother. As I was sayin’, ‘twould be awful hard
for him anyhow, but now when he’s growed up, and anyone tells
him about how his mother was murdered by his father, and how his
father got hung for it, and they show him the pictures in the paper
and all that, I don’t see how he’ll ever have any show. It seems as if
the state had ought to do somethin’ for a child when the state kills
its father that way, but it don’t unless they sends him to a poor
house, or something like that.
“Now, I haven’t told you a single lie—and you can see how it all was,
and that I wa’n’t so awful bad, and that I’m sorry, and would be
willin’ to die if it would bring her back. And if you can, I wish you’d
just kind of keep your eye on the boy. I guess it’ll be a good deal
better to change his name and not let him nor anyone else know
anything about either of us. A good many poor people grow up that
way. I don’t really know nothin’ ‘bout my folks. They might’ve been
hung too, for all I know. But you kind of watch the boy and keep
track of him, and if he comes up all right and seems to be a smart
feller and looks at things right, and he gets to wonderin’ about me,
and you think ‘twill do any good you can tell him just what you feel a
mind to, but don’t tell him ‘less’n you think it will do him good. Of
course, I can’t never pay you in any way for what you’ve done for
me, but mebbe you’ll think it’s worth while for a feller that hain’t a
friend in the world, and who’s got to be hung so quick.”
Hank struggled as hard as he could to keep back the tears. He was
not much used to crying, but in spite of all his efforts they rolled
down his face.
“Well, Jim, old feller,” he said. “I didn’t know how it was—when I
come I felt as if you’d been awful bad, and of course I know it wa’n’t
right, but somehow I know it might have happened to me, or ‘most
anybody, almost, and that you ain’t so bad. I can’t tell you anything
about how I feel, but I’m glad I come. It’s done me good. I don’t
think I’ll ever feel the same about the fellers that go to jail and get
hung. I don’t know’s they could help it any more’n any of us can
help the things we do. Anyhow, I sha’n’t never let the boy out of my
mind a single minit, and I’ll do as much for him as if he was mine.
I’ll look him up the first thing I do. I don’t know about changin’ his
name, I’ll see. Anyhow, if he ever gets to hear a bit of it, I’ll see he
knows how it was.”
Jim wrung Hank’s hand for a minute in silence, and then said: “And
just one word more, Hank; tell him not to be poor; don’t let him get
married till he’s got money, and can afford it, and don’t let him go in
debt. You know I don’t believe I ever would have done it if I hadn’t
been so poor.”
Hank drew back his hand and stepped to the grated door and looked
out along the gloomy iron corridors and down toward the courtyard
below. Then he looked up at the tiers of cells filled with the hapless
outcasts of the world. On the skylight he could see the faint
yellowish glow that told him that the day was about to dawn. The
guard got up from his stool and passed him another flask of whiskey.
“Here, you’d better get Jim to drink all he can,” he whispered, “for
his time is almost up.”
Hank took a little sip himself, and then motioned Jim to drink. Jim
took the bottle, raised it to his mouth and gulped it down, scarcely
stopping to catch his breath. Then he threw the bottle on the bed
and sat down on his chair. With the story off his mind it was plain
that the whiskey was fast numbing all his nerves. He was not himself
when he looked up again.
“I guess mebbe I’d better change my clothes, while I have a
chance,” he said. “I don’t want anyone else to have to do it for me,
and I want to look all right when the thing comes off.”
A new guard came up to the door, unlocked it and came in. He
nodded to Hank and told him he must go.
“His breakfast is just comin’ up and it’s against the rules to have
anyone here at the time. The priest will come to see him after he
gets through eatin’.”
Over in the corridor where Hank had seen the beams and lumber he
could hear the murmur of muffled voices, evidently talking about the
work. Along the corridor two waiters in white coats were bringing
great trays filled with steaming food.
Slowly Hank turned to Jim and took his hand.
“Well, old fellow,” he said, “I’ve got to go. I see you’re all right, but
take that Scotch whiskey when it comes; it won’t do you any hurt.
I’ll look after everything just as I said. Good-bye.”
Jim seemed hardly to hear Hank’s farewell words.
“Well, good-bye.”
Hank went outside the door and the guard closed and locked it as he
turned away.
Then Jim got up from his chair and stumbled to the door.
“Hank! Hank! S’pose—you—stop at the—telegraph—office—the
Western Union—and the—Postal—all of ‘em—mebbe—might—be
somethin’——”
“All right,” Hank called back, “I will! I will!—I’ll go to both to make
sure if there’s anything there; and I’ll telephone you by the time
you’ve got through eatin’.”
T
BIG BLUE BOOKS
30c EACH POSTPAID
TO ANY ADDRESS
hese Big Blue Books are a companion series to the Little Blue
Books. They are much larger-–5½×8½ inches in size, bound in
attractive stiff card covers and contain from 30,000 to 75,000 words
of text, ranging from 64 to 128 pages each. The type is large, clear
and easy to read. The books are printed on good book paper and
are thoroughly substantial, accurate, and worth while in every way.
Make your selection now—one book or more, up to any quantity you
wish, for 30c per book postpaid to any address in the world.
Always Order by Number-–30c Each
LOVE AND SEX
B–46 The Sexual Life of Man, Woman and Child. Dr. Isaac Goldberg.
(Chapters include “Sex,” “From Morality to Taste,” “Lust and Love,” etc.)
B–41 Love’s Coming of Age: A Series of Papers on the Relations of the
Sexes. Edward Carpenter. (Chapters include “Sex-Passion,” “Man the
Ungrown,” “Woman the Serf,” “Intermediate Sex,” “Note on Preventive
Checks to Population,” etc.)
B–32 The History of a Woman’s Heart (Une Vie). Guy de Maupassant.
(Complete novel by the famous French master of fiction.)
B–3 The Love Sorrows of Young Werther. Goethe. (Famous love story).
FICTION
B–6 Zadig, or Destiny; Micromegas and The Princess of Babylon. Voltaire.
(Famous satirical fiction.)
B–30 Candide: A Satire on the Notion That This Is the Best of All Possible
Worlds. Voltaire.
B–12 Grimm’s Famous Fairy Tales.
B–24 An Eye for an Eye. Clarence Darrow. (Complete Novel.)
B–33 A Sentimental Journey Through France and Italy. Laurence Sterne.
(Intimate notes on travel experiences—one of the most famous books in
English literature.)
B–31 The Sign of the Four (Sherlock Holmes Story). Conan Doyle.
B–35 A Study in Scarlet (Sherlock Holmes Story). Conan Doyle.
FAMOUS PLAYS
B–2 The Maid of Orleans: A Romantic Tragedy. Friedrich von Schiller.
Adapted from the German by George Sylvester Viereck.
B–9 Faust (Part I). Goethe. Translated by Anna Swanwick. Edited, with
Introduction and Notes, by Margaret Munsterberg.
B–10 Faust (Part II). Goethe. Translated by Anna Swanwick, etc.
B–17 William Congreve’s Way of the World (A Comedy). With an essay by
Macaulay, extracts from Lamb, Swift and Hazlitt, etc. Edited, with
Introduction and Notes, by Lloyd E. Smith.
B–26 Nathan the Wise (Famous Liberal Play). Gotthold Ephraim Lessing.
Translated and Edited by Leo Markun.
AUTOBIOGRAPHY AND BIOGRAPHY
B–19 Persons and Personalities. Paragraphs and Essays. E. Haldeman-
Julius.
B–8 The Fun I Get Out of Life. E. Haldeman-Julius.
B–13 John Brown: The Facts of His Life and Martyrdom. E. Haldeman-
Julius.
B–45 Confessions of a Young Man. George Moore.
B–28 The Truth About Aimee Semple Mcherson. A Symposium. Louis
Adamic, and Others.
HALDEMAN-JULIUS PUBLICATIONS
GIRARD, KANSAS
PHILOSOPHY AND RELIGION
B–4 The Wisdom of Life. Being the first of Arthur Schopenhauer’s
Aphorismen zur Lebensweisheit. Translated with a Preface by T. Bailey
Saunders.
B–5 Counsels and Maxims. Being the second part of Arthur Schopenhauer’s
Aphorismen zur Lebensweisheit. Translated by T. Bailey Saunders.
B–1 On Liberty. John Stuart Mill. (Chapters include “Liberty of Thought and
Discussion,” “Individuality,” “Limits to Authority of Society Over the
Individual,” etc.)
B–14 Evolution and Christianity. William M. Goldsmith.
B–18 Resist Not Evil. Clarence Darrow. (Chapters include “Nature of the
State,” “Armies and Navies,” “Crime and Punishment,” “Cause of Crime,”
“Law and Conduct,” “Penal Codes and Their Victims,” etc.)
FAMOUS TRIALS
B–29 Clarence Darrow’s Two Great Trials (Reports of the Scopes Anti-
Evolution Case and the Dr. Sweet Negro Trial). Marcet Haldeman-Julius.
B–20 Clarence Darrow’s Plea in Defense of Loeb and Leopold (August 22,
23, 25, 1924).
B–47 Trial of Rev. J. Frank Norris. Marcet Haldeman-Julius.
CULTURE AND EDUCATION
B–15 Culture and Its Modern Aspects. A Series of Essays. E. Haldeman-
Julius.
B–22 A Road-Map to Literature: Good Books to Read. Lawrence Campbell
Lockley and Percy Hazen Houston.
B–36 What is Wrong with Our Schools? A Symposium. Nelson Antrim
Crawford, Charles Angoff, etc.
B–34 Panorama: A Book of Critical, Sexual, and Esthetic Views. Dr. Isaac
Goldberg.
B–39 Snapshots of Modern Life. E. Haldeman-Julius.
B–42 Sane and Sensible Views of Life. E. Haldeman-Julius.
B–43 Clippings from an Editor’s Scrapbook. E. Haldeman-Julius.
B–16 Iconoclastic Literary Reactions. E. Haldeman-Julius
B–11 The Compleat Angler: Famous Book on a Beloved Sport. Izaak
Walton (Patron Saint of Fishermen).
B–44 Algebra Self Taught: With Problems and Answers. Lawrence A.
Barrett.
RATIONALISM AND DEBUNKING
B–7 Studies In Rationalism. E. Haldeman-Julius.
B–21 Confessions of a Debunker. E. Haldeman-Julius.
B–23 The Bunk Box: A Collection of the Bits of Bunk That Infest American
Life. E. Haldeman-Julius.
B–25 An Agnostic Looks at Life: Challenges of a Militant Pen. E. Haldeman-
Julius.
B–37 Free Speech and Free Thought In America. E. Haldeman-Julius.
B–38 Myths and Myth-Makers. E. Haldeman-Julius.
B–40 This Tyranny of Bunk. E. Haldeman-Julius.
JOSEPH McCABE’S SHAM-SMASHING BOOKS
B–27 The Truth About the Catholic Church (Chapters include “The Papacy,”
“Myth of Catholic Scholarship,” “Confessional,” “Catholic Services,” “Behind
the Scenes with the Catholic Clergy,” etc.)
B–48 Debunking the Lourdes “Miracles.” Also Includes “The Church In
Mexico,” “The Cowardice of American Scientists,” “England’s Religious
Census,” etc.
COMPLETE SET OF 48 VOLUMES FOR ONLY $12.78: Get a
good supply of excellent reading—invest in a complete set of 48 Big
Blue Books, all now ready and in stock for immediate delivery. You
can get all 48 volumes for only $12.78 prepaid. Use the blank below
to order this set, or for your choice of any books at 30c each
postpaid.
Haldeman-Julius Publications, Girard, Kansas
I enclose herewith $ ..... for ..... Big Blue Books at 30c each postpaid. I am
putting a circle around the numbers of the books I want, below,
corresponding to the numbers for the items in your list.
B–
1
B–
2
B–
3
B–
4
B–
5
B–
6
B–
7
B–
8
B–
9
B–
10
B–
11
B–
12
B–
13
B–
14
B–
15
B–
16
B–
17
B–
18
B–
19
B–
20
B–
21
B–
22
B–
23
B–
24
B–
25
B–
26
B–
27
B–
28
B–
29
B–
30
B–
31
B–
32
B–
33
B–
34
B–
35
B–
36
B–
37
B–
38
B–
39
B–
40
B–
41
B–
42
B–
43
B–
44
B–
45
B–
46
B–
47
B–
48
If you want a Complete Set of 48 Volumes, remit $12.78 and check here
.....
Name .....................................................
Address ..................................................
City .................................... State ..........
A
SANE SEX SERIES
Authentic
Information
50
Volumes
A
Leather
Cover
All for
$2.98
re you ignorant of the facts of Life? Do you want authentic
information about sex and love and their proper place in human
affairs? Then these 50 volumes are what you have been waiting for.
These books are helping thousands of people to understand
themselves and others. Here are the facts, written by authorities—by
psychologists, sociologists, physicians, and scientists. These books
can be depended upon. There is nothing in these books to harm
anyone, nothing to create any wrong ideas about life. The whole
viewpoint is modern, sane, and healthful. These books foster a
wholesome outlook on life, and at the same time give the facts
everyone should know in a way which everyone can understand.
Some of the eminent authorities who have prepared the text for
these books are Havelock Ellis, the famous English expert on sexual
psychology; James Oppenheim, a N.Y. practicing psycho-analyst;
William J. Fielding, well-known for his recent book, “Sex and the
Love-Life”; Dr. Morris Fishbein of the American Medical Association;
Dr. Joseph H. Greer; Dr. Wilfrid Lay; Dr. Charles Reed; Professor C. L.
Fenton, etc. Do not hesitate to rely upon these books; they are
thoroughly up to date, containing the latest facts available.
50 Volumes-–750,000 Words
Each of these books contains about 15,000 words of text, making 750,000
words in all. The books are of a convenient size (3½ × 5 inches) to fit the
pocket, average 64 pages each, have easily readable type, and are bound
in substantial stiff card covers. If these books were issued in ordinary
library form they would cost from $25 to $30 for the set. But in this neat
pocket-sized edition, due to mass production, they are offered for only
$2.98, full and final payment for the entire 50 volumes and a leather cover.
A Real Leather Cover
Included with each set of 50 volumes, at no extra cost, is a genuine leather
slip cover, made from high grade black levant leather. This cover holds one
book at a time, protecting it while in use; a book may be slipped in or out
in a few seconds. This cover has the added advantage that it can be slipped
on a book to carry in the pocket, thus concealing the cover and title if
anyone prefers to avoid possible embarrassment. Not only this, but you can
enjoy the luxurious “feel” of real leather while reading these books. And
remember—$2.98 is positively all you pay for 50 books and this leather
cover.
50 BOOKS
Sane Sex Facts for Everyone
Facts for Girls
Facts for Boys
Facts for Young Men
Facts for Young Women
For Married Men
For Married Women
Manhood Facts
Womanhood Facts
For Women Past 40
For Expectant Mothers
Woman’s Sex-Life
Man’s Sex-Life
The Child’s Sex-Life
Homosexual Life
Evolution of Sex
Physiology of Sex
Sex Common Sense
Determination of Sex
Sex Symbolism
Sex in Psychoanalysis
Sleep and Sex Dreams
Chats with Wives
Chats with Husbands
Talks with the Married
How to Love
Art of Kissing
How to Win a Mate
Beginning Marriage Right
Happiness in Marriage
Sex Ethics
Modern Sex Morality
Love Letters
Psychology of Affections
Birth Control Immoral?
Birth Control Today
Women’s Love Rights
Sex Today (.it Ellis)
Ellis and Sex Sanity
Eugenics Explained
Genetics Made Plain
Heredity Made Plain
Venereal Diseases
Syphilis Facts
Sex and Crime
America’s Sex Impulse
Sex in Religion
What Is Love?
Story of Marriage
Sex Rejuvenation
Companionate Marriage
SEND NO MONEY
For this Sane Sex Series of 50 volumes and a leather cover you need not
remit in advance unless you wish. You can pay the postman only $2.98 on
delivery. This set is shipped in plain wrapper. Use the blank at the right,
or just ask for “Sane Sex Series.” No C. O. D. orders can be sent to Canada
or foreign countries; these must remit in advance by international postal
money order or draft on any U. S. bank.
SIGN AND MAIL THIS BLANK
Haldeman-Julius Publications,
Girard, Kansas
Send me the 50–volume SANE
SEX SERIES and 1 Leather
Cover, in plain wrapper. Unless
my check is enclosed herewith, I
will pay the postman $2.98 on
arrival. It is understood that
$2.98 is all I pay and that I am
under no further obligation
whatever.
Name
................................................
Address
.............................................
City ............................. State
............
THE MODERN LIBRARY
88 CENTS PER COPY PREPAID
Your Choice
OSCAR WILDE
Salome, Importance of Being Earnest, Lady Windermere’s Fan.
Ideal Husband and A Woman of No Importance.
De Profundis (Out of the Depths).
Dorian Gray (Novel).
Poems (Harlot’s House, Sphinx, Reading Gaol, etc.)
Fairy Tales and Poems in Prose.
Pen, Pencil and Poison.
ANATOLE FRANCE
Crime of Sylvestre Bonnard.
Queen Pedauque.
Red Lily.
Thais.
GABRIELE D’ANNUNZIO
Flame of Life.
Child of Pleasure.
Maidens of the Rocks.
Triumph of Death.
THOMAS HARDY
Jude the Obscure.
Major of Casterbridge.
Return of the Native.
FRIEDRICH NIETZSCHE
Thus Spake Zarathustra.
Beyond Good and Evil.
Genealogy of Morals.
Ecce Homo and The Birth of Tragedy.
HENRIK IBSEN
Doll’s House, Ghosts, and An Enemy of the People.
Hedda Gabler, Pillars of Society and The Master Builder.
Wild Duck, Rosmersholm and The League of Youth.
GUY DE MAUPASSANT
Love and Other Stories (For Sale, Clochette, His Wedding
Night, Moonlight, etc.)
Mademoiselle Fifi and Other Tales (Piece of String, Tallow
Ball, Useless Beauty, The Horla, A Farm Girl, etc.).
Une Vie (Story of a Woman’s Heart).
SHERWOOD ANDERSON
Poor White (A Novel).
Winesburg, Ohio (Short Stories).
SAMUEL BUTLER
Erewhon, or Over the Range.
Way of All Flesh.
JAMES BRANCH CABELL
Beyond Life.
Cream of the Jest.
NORMAN DOUGLAS
South Wind (A Novel).
Old Calabria.
LORD DUNSANY
Dreamer’s Tales.
Book of Wonder.
GUSTAVE FLAUBERT
Madame Bovary.
Temptation of St. Anthony.
W. S. GILBERT
Mikado, Iolanthe, Pirates of Penzance, and The Gondoliers.
H. M. S. Pinafore, Patience, Yeomen of the Guard and
Ruddigore.
GEORGE GISSING
New Grub Street.
Private Papers of Henry Ryecroft.
REMY DE GOURMONT
Night in the Luxembourg.
Virgin Heart (Translated by Aldous Huxley).
W. H. HUDSON
Green Mansions.
Purple Land.
D. H. LAWRENCE
Rainbow.
Sons and Lovers.
GEORGE MEREDITH
Diana of the Crossways.
Ordeal of Richard Feverel.
WALTER PATER
Renaissance.
Marius the Epicurean.
ARTHUR SCHNITZLER
Anatol, Green Cockatoo, and Living Hours.
Bertha Garlan.
AUGUST STRINDBERG
Married.
Miss Julie, The Creditor, The Stronger Woman, Motherly Love,
Paria and Simoon.
LEO TOLSTOY
Redemption, Power of Darkness and Fruits of Culture.
Death of Ivan Ilyitch, Polikushka, Two Hussars, Snowstorm,
and Three Deaths.
IVAN TURGENEV
Fathers and Sons.
Smoke.
MISCELLANEOUS
Modern American Poetry. Ed. Conrad Aiken.
Seven That Were Hanged and the Red Laugh. Leonid
Andreyev.
Short Stories by Honore de Balzac (Don Juan, Christ in
Flanders, Time of the Terror, Passion in the Desert, Accursed
House, Atheist’s Mass, etc.).
Prose and Poetry. Baudelaire.
Art of Aubrey Beardsley (64 Reproductions).
Art of Rodin (64 Reproductions).
Jungle Peace. William Beebe.
Zuleika Dobson. Max Beerbohm.
In the Midst of Life (Stories). Ambrose Bierce.
Poems of William Blake.
Wuthering Heights. Emily Bronte.
House With the Green Shutters. George Douglas Brown.
Love’s Coming of Age. Edward Carpenter.
Alice in Wonderland, Through the Looking-Glass and Hunting
of the Snark. Lewis Carroll.
Autobiography of Benvenuto Cellini.
Rothschild’s Fiddle. Anton Chekhov.
Man Who Was Thursday. G. K. Chesterton.
Men, Women and Boats. Stephen Crane.
Sapho. Alphonse Daudet. Also contains Manon Lescaut (When
a Man Loves) by Antoine Prevost.
Moll Flanders. Daniel Defoe.
Poor People. Feodor Dostoyevsky.
Poems and Prose. Ernest Dowson.
Free and Other Stories. Theodore Dreiser.
Camille. Alexandre Dumas.
New Spirit, The. Havelock Ellis.
Life of the Caterpillar. Jean Henri Fabre.
Jorn Uhl. Gustav Frenssen.
Mlle. de Maupin. Theophile Gautier.
Bed of Roses. W. L. George.
Renee Mauperin. E. and J. de Goncourt.
Creatures That Once Were Men and Other Stories. Maxim
Gorki.
Scarlet Letter. Nathaniel Hawthorne.
Some Chinese Ghosts. Lafcadio Hearn.
Erik Dorn. Ben Hecht.
Daisy Miller and An International Episode. Henry James.
Philosophy of William James.
Dubliners. James Joyce.
Soldiers Three. Rudyard Kipling.
Men in War. Andreas Latzko.
Upstream. Ludwig Lewisohn.
Mme. Chrysantheme. Pierre Loti.
Spirit of American Literature. John Macy.
Miracle of St. Anthony, Pelleas and Melisande, and Four Other
Plays. Maurice Maeterlinck.
Moby Dick, or The Whale. Herman Melville.
Romance of Leonardo da Vinci. Dmitri Merejkowski.
Plays by Moliere (Highbrow Ladies, School for Wives, Tartuffe,
Misanthrope, etc.)
Confessions of a Young Man. George Moore.
Tales of Mean Streets. Arthur Morrison.
Moon of the Caribbees and Other Plays (Bound East for
Cardiff, In the Zone, Ile, etc.). Eugene O’Neill.
Writings of Thomas Paine.
Pepys’ Diary.
Best Tales of Poe.
Life of Jesus. Ernest Renan.
Selected Papers of Bertrand Russell.
Imperial Orgy. Edgar Saltus.
Studies in Pessimism. Arthur Schopenhauer.
Story of an African Farm. Olive Schreiner.
Unsocial Socialist. George Bernard Shaw.
Philosophy of Spinoza.
Treasure Island. Robert Louis Stevenson.
Ego and His Own. Max Stirner.
Dame Care. Hermann Sudermann.
Poems of Algernon Charles Swinburne.
Complete Poems of Francis Thompson.
Ancient Man. Hendrik Willem van Loon.
Poems of Francois Villon.
Candide. Voltaire.
Ann Veronica. H. G. Wells.
Poems of Walt Whitman.
Selected Addresses and Papers of Woodrow Wilson.
Irish Fairy and Folk Tales. William Butler Yeats.
Nana. Emile Zola.
COLLECTIONS—SYMPOSIUMS
A Modern Book of Criticisms: Edited by Ludwig Lewisohn,
with contributions by G. B. Shaw, Anatole France, Remy de
Gourmont, Geo. Moore, etc.
The Woman Question: Westermarck’s Subjection of Wives,
Ellen Key’s Right of Motherhood, Carpenter’s Woman in
Freedom, Maeterlinck’s On Women, Havelock Ellis’ Changing
Status of Women, etc.

More Related Content

PDF
Digital Soil Mapping Across Paradigms Scales And Boundaries 1st Edition Ganli...
PDF
Soil mapping goes digital - the GlobalSoilMap experience by Alex. McBratney
 
PDF
Introduction to DSM
 
PDF
5. Introduction to Digital Soil Mapping
PDF
Soil Mapping And Process Modeling For Sustainable Land Use Management 1st Edi...
PDF
3. Technical introduction to the Digital Soil Mapping
 
PDF
Soil mapping , remote sensing and use of sensors in precision farming
PPTX
Facing the Future Turbo Talk - 26-27th May 2015
Digital Soil Mapping Across Paradigms Scales And Boundaries 1st Edition Ganli...
Soil mapping goes digital - the GlobalSoilMap experience by Alex. McBratney
 
Introduction to DSM
 
5. Introduction to Digital Soil Mapping
Soil Mapping And Process Modeling For Sustainable Land Use Management 1st Edi...
3. Technical introduction to the Digital Soil Mapping
 
Soil mapping , remote sensing and use of sensors in precision farming
Facing the Future Turbo Talk - 26-27th May 2015

Similar to Using R for Digital Soil Mapping Progress in Soil Science Malone (20)

PDF
DSM training - preparing auxiliary data
PPTX
Digital Soil Mapping/ Pedomterics
PDF
Capacity development on Digital soil Mapping
PDF
Integrating Data Science And Earth Science Challenges And Solutions Laurens B...
PPTX
Methods of prediction and assessment techniques of impacts soil
PDF
Status of digiatal soil mapping in BSWM by Silvino Q. Tejada and Rodelio B. C...
 
PPTX
Craig Walker & Peter Doherty_Soils-to-Satellites: National capabilities worki...
PDF
DSM_46CNCS.pptx.pdf
PPTX
XIIa - Sudan Soil Information System (SUSIS)
PDF
Soil Conservation & Management
PDF
Digital Soil Mapping by Ronald Vargas Rojas
 
PDF
Soil mapping; Fertilizer recommendation using geospatial technologies.pdf
PDF
Building capacities for digital soil organic carbon mapping
PPTX
SUDHISH SIR CLASS
PDF
GIS and Remote Sensing
PDF
Transparent Soil Modelling Technique And Its Application Honghua Zhao
PDF
Status of global soil information, Adopting new technology and rebuilding ins...
 
PDF
2. Soil organic carbon - GSOCmap
PPT
Michael Robotham-Use of soils information for Land Management in the United S...
PDF
Geospatial_Center_Brochure_2016
DSM training - preparing auxiliary data
Digital Soil Mapping/ Pedomterics
Capacity development on Digital soil Mapping
Integrating Data Science And Earth Science Challenges And Solutions Laurens B...
Methods of prediction and assessment techniques of impacts soil
Status of digiatal soil mapping in BSWM by Silvino Q. Tejada and Rodelio B. C...
 
Craig Walker & Peter Doherty_Soils-to-Satellites: National capabilities worki...
DSM_46CNCS.pptx.pdf
XIIa - Sudan Soil Information System (SUSIS)
Soil Conservation & Management
Digital Soil Mapping by Ronald Vargas Rojas
 
Soil mapping; Fertilizer recommendation using geospatial technologies.pdf
Building capacities for digital soil organic carbon mapping
SUDHISH SIR CLASS
GIS and Remote Sensing
Transparent Soil Modelling Technique And Its Application Honghua Zhao
Status of global soil information, Adopting new technology and rebuilding ins...
 
2. Soil organic carbon - GSOCmap
Michael Robotham-Use of soils information for Land Management in the United S...
Geospatial_Center_Brochure_2016
Ad

Recently uploaded (20)

PPTX
Lesson notes of climatology university.
PDF
Classroom Observation Tools for Teachers
PPTX
Institutional Correction lecture only . . .
PDF
O7-L3 Supply Chain Operations - ICLT Program
PPTX
202450812 BayCHI UCSC-SV 20250812 v17.pptx
PPTX
Presentation on HIE in infants and its manifestations
PDF
Chapter 2 Heredity, Prenatal Development, and Birth.pdf
PDF
Complications of Minimal Access Surgery at WLH
PDF
2.FourierTransform-ShortQuestionswithAnswers.pdf
PDF
O5-L3 Freight Transport Ops (International) V1.pdf
PDF
STATICS OF THE RIGID BODIES Hibbelers.pdf
PPTX
Cell Structure & Organelles in detailed.
PDF
The Lost Whites of Pakistan by Jahanzaib Mughal.pdf
PPTX
Final Presentation General Medicine 03-08-2024.pptx
PPTX
PPT- ENG7_QUARTER1_LESSON1_WEEK1. IMAGERY -DESCRIPTIONS pptx.pptx
PDF
Anesthesia in Laparoscopic Surgery in India
PDF
Computing-Curriculum for Schools in Ghana
PPTX
Pharma ospi slides which help in ospi learning
PDF
01-Introduction-to-Information-Management.pdf
PPTX
Cell Types and Its function , kingdom of life
Lesson notes of climatology university.
Classroom Observation Tools for Teachers
Institutional Correction lecture only . . .
O7-L3 Supply Chain Operations - ICLT Program
202450812 BayCHI UCSC-SV 20250812 v17.pptx
Presentation on HIE in infants and its manifestations
Chapter 2 Heredity, Prenatal Development, and Birth.pdf
Complications of Minimal Access Surgery at WLH
2.FourierTransform-ShortQuestionswithAnswers.pdf
O5-L3 Freight Transport Ops (International) V1.pdf
STATICS OF THE RIGID BODIES Hibbelers.pdf
Cell Structure & Organelles in detailed.
The Lost Whites of Pakistan by Jahanzaib Mughal.pdf
Final Presentation General Medicine 03-08-2024.pptx
PPT- ENG7_QUARTER1_LESSON1_WEEK1. IMAGERY -DESCRIPTIONS pptx.pptx
Anesthesia in Laparoscopic Surgery in India
Computing-Curriculum for Schools in Ghana
Pharma ospi slides which help in ospi learning
01-Introduction-to-Information-Management.pdf
Cell Types and Its function , kingdom of life
Ad

Using R for Digital Soil Mapping Progress in Soil Science Malone

  • 1. Using R for Digital Soil Mapping Progress in Soil Science Malone install download http://ebookstep.com/product/using-r-for-digital-soil-mapping- progress-in-soil-science-malone/ Download more ebook from https://ebookstep.com
  • 2. We believe these products will be a great fit for you. Click the link to download now, or visit ebookstep.com to discover even more! Parallel Genetic Algorithms for Financial Pattern Discovery Using GPUs SpringerBriefs in Applied Sciences and Technology Baúto http://ebookstep.com/product/parallel-genetic-algorithms-for- financial-pattern-discovery-using-gpus-springerbriefs-in-applied- sciences-and-technology-bauto/ Public Investment Criteria: Using an Interregional Input-Output Programming Model (New Frontiers in Regional Science: Asian Perspectives, 2) Kohno http://ebookstep.com/product/public-investment-criteria-using-an- interregional-input-output-programming-model-new-frontiers-in- regional-science-asian-perspectives-2-kohno/ Statistique et Data Science Avec R François Husson http://ebookstep.com/product/statistique-et-data-science-avec-r- francois-husson/ Science and Technology for Society 5 0 Tim Penulis http://ebookstep.com/product/science-and-technology-for- society-5-0-tim-penulis/
  • 3. Science questions in Sindhi Pakistani http://ebookstep.com/product/science-questions-in-sindhi- pakistani/ The Morphophonological Development of the Classical Aramaic Verb Linguistic Studies in Ancient West Semitic 1st Edition Malone http://ebookstep.com/product/the-morphophonological-development- of-the-classical-aramaic-verb-linguistic-studies-in-ancient-west- semitic-1st-edition-malone/ Intro to Python for Computer Science and Data Science: Learning to Program with AI, Big Data and The Cloud 1st Edition Deitel http://ebookstep.com/product/intro-to-python-for-computer- science-and-data-science-learning-to-program-with-ai-big-data- and-the-cloud-1st-edition-deitel/ Data Science Инсайдерская информация для новичков Включая язык R 1st Edition Кэти О’Нил https://ebookstep.com/download/ebook-10651576/ Qualität und Data Science in der Marktforschung Bernhard Keller http://ebookstep.com/product/qualitat-und-data-science-in-der- marktforschung-bernhard-keller/
  • 4. Progress in Soil Science Brendan P. Malone Budiman Minasny Alex B. McBratney Using R for Digital Soil Mapping
  • 5. Progress in Soil Science Series editors Alfred E. Hartemink, Department of Soil Science, FD Hole Soils Lab, University of Wisconsin—Madison, USA Alex B. McBratney, Sydney Institute of Agriculture, The University of Sydney, Eveleigh, NSW, Australia
  • 6. Aims and Scope Progress in Soil Science series aims to publish books that contain novel approaches in soil science in its broadest sense – books should focus on true progress in a particular area of the soil science discipline. The scope of the series is to publish books that enhance the understanding of the functioning and diversity of soils in all parts of the globe. The series includes multidisciplinary approaches to soil studies and welcomes contributions of all soil science subdisciplines such as: soil genesis, geography and classification, soil chemistry, soil physics, soil biology, soil mineralogy, soil fertility and plant nutrition, soil and water conservation, pedometrics, digital soil mapping, proximal soil sensing, digital soil morphometrics, soils and land use change, global soil change, natural resources and the environment. More information about this series at http://www.springer.com/series/8746
  • 7. Brendan P. Malone • Budiman Minasny Alex B. McBratney Using R for Digital Soil Mapping 123
  • 8. Brendan P. Malone Sydney Institute of Agriculture The University of Sydney Eveleigh, NSW, Australia Alex B. McBratney Sydney Institute of Agriculture The University of Sydney Eveleigh, NSW, Australia Budiman Minasny Sydney Institute of Agriculture The University of Sydney Eveleigh, NSW, Australia ISSN 2352-4774 ISSN 2352-4782 (electronic) Progress in Soil Science ISBN 978-3-319-44325-6 ISBN 978-3-319-44327-0 (eBook) DOI 10.1007/978-3-319-44327-0 Library of Congress Control Number: 2016948860 © Springer International Publishing Switzerland 2017 This work is subject to copyright. All rights are reserved by the Publisher, whether the whole or part of the material is concerned, specifically the rights of translation, reprinting, reuse of illustrations, recitation, broadcasting, reproduction on microfilms or in any other physical way, and transmission or information storage and retrieval, electronic adaptation, computer software, or by similar or dissimilar methodology now known or hereafter developed. The use of general descriptive names, registered names, trademarks, service marks, etc. in this publication does not imply, even in the absence of a specific statement, that such names are exempt from the relevant protective laws and regulations and therefore free for general use. The publisher, the authors and the editors are safe to assume that the advice and information in this book are believed to be true and accurate at the date of publication. Neither the publisher nor the authors or the editors give a warranty, express or implied, with respect to the material contained herein or for any errors or omissions that may have been made. Printed on acid-free paper This Springer imprint is published by Springer Nature The registered company is Springer International Publishing AG Switzerland
  • 9. Foreword Digital soil mapping is a runaway success. It has changed the way we approach soil resource assessment all over the world. New quantitative DSM products with associated uncertainty are appearing weekly. Many techniques and approaches have been developed. We can map the whole world or a farmer’s field. All of this has happened since the turn of the millennium. DSM is now beginning to be taught in tertiary institutions everywhere. Government agencies and private companies are building capacity in this area. Both practitioners of conventional soil mapping methods and undergraduate and research students will benefit from following the easily laid out text and associated scripts in this book carefully crafted by Brendan Malone and colleagues. Have fun and welcome to the digital soil century. Dominique Arrouays – Scientific coordinator of GlobalSoilMap. v
  • 10. Preface Digital soil mapping (DSM) has evolved from a science-driven research phase of the early 1990s to presently a fully operational and functional process for spatial soil assessment and measurement. This evolution is evidenced by the increasing extents of DSM projects from small research areas towards regional, national and even continental extents. Significant contributing factors to the evolution of DSM have been the advances in information technologies and computational efficiency in recent times. Such advances have motivated numerous initiatives around the world to build spatial data infrastructures aiming to facilitate the collection, maintenance, dissemination and use of spatial information. Essentially, fine-scaled earth resource information of improving qualities is gradually coming online. This is a boon for the advancement of DSM. More importantly, however, the contribution of the DSM community in general to the development of such generic spatial data infrastructure has been through the ongoing creation and population of regional, continental and worldwide soil databases from existing legacy soil information. Ambitious projects such as those proposed by the GlobalSoilMap consortium, whose objective is to generate a fine-scale 3D grid of a number of soil properties across the globe, provide some guide to where DSM is headed operationally. We are also seeing in some countries of the world the development of nationally consistent comprehensive digital soil information systems—the Australian Soil Grid http://www.clw.csiro.au/ aclep/soilandlandscapegrid/ being particularly relevant in that regard. Besides the mapping of soil properties and classes, DSM approaches have been extended to other soil spatial analysis domains such as those of digital soil assessment (DSA) and digital soil risk assessment (DSRA). It is an exciting time to be involved in DSM. But with development and an increase in the operational status of DSM, there comes a requirement to teach, share and spread the knowledge of DSM. Put more simply, there is a need to teach more people how to do it. It is such that this book attempts to share and disseminate some of that knowledge. vii
  • 11. viii Preface The focus of the materials contained in the book is to learn how to carry out DSM in a real work situation. It is procedural and attempts to give the participant a taste and a conceptual framework to undertake DSM in their own technical fields. The book is very instructional—a manual of sorts—and therefore completely interactive in that participants can access and use the available data and complete exercises using the available computer scripts. The examples and exercises in the book are delivered using the R computer programming environment. Subsequently, this course is both training in DSM and R. Using R, this course will introduce some basic R operations and functionality in order to gain some fluency in this popular scripting language. The DSM exercises will cover procedures for handling and manipulating soil and spatial data in R and then introduce some basic concepts and practices relevant to DSM, which importantly includes the creation of digital soil maps. As you will discover, DSM is a broad term that entails many applications, of which a few are covered in this book. The material contained in this book has been cobbled together over successive years from 2009. This effort has largely been motivated by the need to prepare a hands-on DSM training course with associated materials as an outreach programme of the Pedometrics and Soil Security research group at the University of Sydney. The various DSM workshops have been delivered to a diverse range of participants: from undergraduates, to postgraduates, to tenured academics, as well as both private and government scientists and consultants. These workshops have been held both at the Soil Security laboratories at the University of Sydney, as well as various locations around the world. The ongoing development of teaching materials for DSM needs to continue over time as new discoveries and efficiencies are made in the field of DSM and, more generally, pedometrics. Therefore, we would be very grateful to receive feedback and suggestions on ways to improve the book so that the materials remain accessible, up to date and relevant. Eveleigh, Australia Brendan P. Malone Budiman Minasny Alex B. McBratney
  • 12. Endorsements This book entitled Using R for Digital Soil Mapping is an excellent book that clearly outlines the step-by-step procedures required for many aspects of digital soil mapping. This is my first time to learn R language and spatial modelling for DSM, but with the instructive book, it’s easy to produce different DSMs by following text and associate R scripts. It has been especially useful in Taiwan for soil organic carbon stock mapping in different soil depths and of different parent materials and different land uses. The other good experience is the clear pointers on how to prepare the covariates to build the spatial prediction functions for DSM by regression models if we do not have enough soil data. I strongly recommend this excellent book to any person to apply DSM techniques for studying the spatial variability of agriculture and environmental sciences. Distinguished Professor Zueng-Sang Chen, Department of Agricultural Chemistry, National Taiwan University, Taipei, Taiwan. I can recommend this book as an excellent support for those wanting to learn digital soil mapping methods. The hands-on exercises provide invaluable examples of code for implementing in the R computing language. The book will certainly assist you to develop skills in R. It will also introduce you to a very wide range of powerful numerical and categorical modelling approaches that are emerging to enable quantitative spatial and temporal inference of soil attributes at all scales from local to global. There is also a valuable chapter on how to assess uncertainty of the digital soil map that has been produced. The book exemplifies the quantum leap that is occurring in quantitative spatial and temporal modelling of soil attributes, and is a must for students of this discipline. Carolyn Hedley, Soil Scientist, New Zealand. Using R for Digital Soil Mapping is a fantastic resource that has enabled us to develop and build our skills in digital soil mapping (DSM) from scratch, so much so that this discipline has now become part of our agency core business in Tasmanian land evaluation. It’s thorough instructional content has enabled us to deliver a state- wide agricultural enterprise suitability mapping programme, developing quantitative ix
  • 13. x Endorsements soil property surfaces with uncertainties through predictive spatial modelling, including covariate processing, optimised soil sampling strategies and standardised soil depth-spline functions. We continually refer to this ‘easy to follow’ guide when developing the necessary R-code to undertake our DSM; using the freely available R environment rather than commercial software in itself has saved thousands of dollars in software fees and allowed automation and time-saving in many DSM tasks. This book is a must for any individual, academic institution or government soil agency wishing to embark into the rapidly developing world of DSM for land evaluation, and will definitely ease the ‘steepness’ in the learning curve. Darren Kidd, Department of Primary Industries Parks Water and Environ- ment, Tasmania, Australia. This excellent book contains clear step-by-step examples in digital soil mapping (DSM), such as how to prepare covariates, to build spatial prediction functions using either regression or classification models and to apply the prediction functions to produce maps and their uncertainties. When I started my research in DSM, I have very little experience in R and spatial modelling. By following clear instructions presented in this book, I have succeeded in learning and developing DSM techniques for mapping the depth and carbon stock in Indonesian tropical peatlands. I highly recommend this book to anyone who wants to learn and apply DSM techniques. Rudiyanto, Institut Pertanian Bogor, Indonesia.
  • 14. Acknowledgements Special thanks to those who have contributed to the development of materials in this book. Pierre Roudier is pretty much solely responsible for helping put together the materials regarding interactive mapping and the caret package for digital soil mapping. Colleagues at the University of Sydney, especially Uta Stockmann, have given continual feedback throughout the development of the DSM teaching materials of the past number of years. Lastly, we are grateful to the numerous participants of our DSM workshops throughout the world. With their feedback and questions, the materials have evolved and been honed over time to make this a reasonably substantial one-stop shop for practicable DSM. Cheers to all! xi
  • 15. Contents 1 Digital Soil Mapping ....................................................... 1 1.1 The Fundamentals of Digital Soil Mapping......................... 1 1.2 What Is Going to Be Covered in this Book? ........................ 4 References.................................................................... 5 2 R Literacy for Digital Soil Mapping ...................................... 7 2.1 Objective.............................................................. 7 2.2 Introduction to R ..................................................... 7 2.2.1 R Overview and History .................................... 7 2.2.2 Finding and Installing R .................................... 8 2.2.3 Running R: GUI and Scripts ............................... 8 2.2.4 RStudio...................................................... 9 2.2.5 R Basics: Commands, Expressions, Assignments, Operators, Objects .......................... 10 2.2.6 R Data Types ................................................ 13 2.2.7 R Data Structures ........................................... 15 2.2.8 Missing, Indefinite, and Infinite Values.................... 17 2.2.9 Functions, Arguments, and Packages...................... 18 2.2.10 Getting Help ................................................ 21 2.2.11 Exercises .................................................... 22 2.3 Vectors, Matrices, and Arrays ....................................... 23 2.3.1 Creating and Working with Vectors ....................... 23 2.3.2 Vector Arithmetic, Some Common Functions, and Vectorised Operations ................................. 26 2.3.3 Matrices and Arrays ........................................ 29 2.3.4 Exercises .................................................... 31 2.4 Data Frames, Data Import, and Data Export ........................ 32 2.4.1 Reading Data from Files ................................... 33 2.4.2 Creating Data Frames Manually ........................... 36 2.4.3 Working with Data Frames................................. 37 xiii
  • 16. xiv Contents 2.4.4 Writing Data to Files ....................................... 40 2.4.5 Exercises .................................................... 41 2.5 Graphics: The Basics................................................. 41 2.5.1 Introduction to the Plot Function ........................ 41 2.5.2 Exercises .................................................... 45 2.6 Manipulating Data.................................................... 46 2.6.1 Modes, Classes, Attributes, Length, and Coercion........ 46 2.6.2 Indexing, Sub-setting, Sorting, and Locating Data ....... 48 2.6.3 Factors....................................................... 56 2.6.4 Combining Data ............................................ 57 2.6.5 Exercises .................................................... 58 2.7 Exploratory Data Analysis ........................................... 58 2.7.1 Summary Statistics ......................................... 58 2.7.2 Histograms and Box Plots.................................. 59 2.7.3 Normal Quantile and Cumulative Probability Plots....... 62 2.7.4 Exercises .................................................... 64 2.8 Linear Models: The Basics .......................................... 64 2.8.1 The lm Function, Model Formulas, and Statistical Output ........................................... 64 2.8.2 Linear Regression .......................................... 65 2.8.3 Exercises .................................................... 71 2.9 Advanced Work: Developing Algorithms with R ................... 71 Reference..................................................................... 79 3 Getting Spatial in R......................................................... 81 3.1 Basic GIS Operations Using R....................................... 82 3.1.1 Points........................................................ 82 3.1.2 Rasters....................................................... 85 3.2 Advanced Work: Creating Interactive Maps in R ................... 88 3.3 Some R Packages That Are Useful for Digital Soil Mapping ...... 91 Reference..................................................................... 93 4 Preparatory and Exploratory Data Analysis for Digital Soil Mapping ................................................................ 95 4.1 Soil Depth Functions ................................................. 96 4.1.1 Fit Mass Preserving Splines with R........................ 97 4.2 Intersecting Soil Point Observations with Environmental Covariates............................................ 101 4.2.1 Using Rasters from File .................................... 105 4.3 Some Exploratory Data Analysis .................................... 106 References.................................................................... 116 5 Continuous Soil Attribute Modeling and Mapping ..................... 117 5.1 Model Validation ..................................................... 117 5.1.1 Model Goodness of Fit ..................................... 118 5.1.2 Model Validation ........................................... 119
  • 17. Contents xv 5.2 Multiple Linear Regression .......................................... 122 5.2.1 Applying the Model Spatially.............................. 126 5.3 Decision Trees........................................................ 130 5.4 Cubist Models ........................................................ 133 5.5 Random Forests ...................................................... 136 5.6 Advanced Work: Model Fitting with Caret Package ............... 141 5.7 Regression Kriging ................................................... 143 5.7.1 Universal Kriging........................................... 144 5.7.2 Regression Kriging with Cubist Models................... 146 References.................................................................... 149 6 Categorical Soil Attribute Modeling and Mapping ..................... 151 6.1 Model Validation of Categorical Prediction Models................ 152 6.2 Multinomial Logistic Regression .................................... 155 6.3 C5 Decision Trees .................................................... 161 6.4 Random Forests ...................................................... 164 References.................................................................... 167 7 Some Methods for the Quantification of Prediction Uncertainties for Digital Soil Mapping................................... 169 7.1 Universal Kriging Prediction Variance .............................. 170 7.1.1 Defining the Model Parameters ............................ 170 7.1.2 Spatial Mapping ............................................ 173 7.1.3 Validating the Quantification of Uncertainty .............. 176 7.2 Bootstrapping......................................................... 178 7.2.1 Defining the Model Parameters ............................ 179 7.2.2 Spatial Mapping ............................................ 182 7.2.3 Validating the Quantification of Uncertainty .............. 185 7.3 Empirical Uncertainty Quantification Through Data Partitioning and Cross Validation.................................... 187 7.3.1 Defining the Model Parameters ............................ 188 7.3.2 Spatial Mapping ............................................ 192 7.3.3 Validating the Quantification of Uncertainty .............. 195 7.4 Empirical Uncertainty Quantification Through Fuzzy Clustering and Cross Validation ..................................... 198 7.4.1 Defining the Model Parameters ............................ 200 7.4.2 Spatial Mapping ............................................ 211 7.4.3 Validating the Quantification of Uncertainty .............. 216 References.................................................................... 218 8 Using Digital Soil Mapping to Update, Harmonize and Disaggregate Legacy Soil Maps ........................................... 221 8.1 DSMART: An Overview ............................................. 223 8.2 Implementation of DSMART........................................ 224 8.2.1 DSMART with R ........................................... 224 References.................................................................... 229
  • 18. xvi Contents 9 Combining Continuous and Categorical Modeling: Digital Soil Mapping of Soil Horizons and Their Depths ....................... 231 9.1 Two-Stage Model Fitting and Validation............................ 234 9.2 Spatial Application of the Two-Stage Soil Horizon Occurrence and Depth Model........................................ 242 References.................................................................... 244 10 Digital Soil Assessments ................................................... 245 10.1 A Simple Enterprise Suitability Example ........................... 245 10.1.1 Mapping Example of Digital Land Suitability Assessment ..................................... 249 10.2 Homosoil: A Procedure for Identifying Areas with Similar Soil Forming Factors ........................................ 254 10.2.1 Global Climate, Lithology and Topography Data......... 254 10.2.2 Estimation of Similarity .................................... 255 10.2.3 The homosoil Function .................................. 256 10.2.4 Example of Finding Soil Homologues .................... 259 References.................................................................... 260 Index............................................................................... 261
  • 19. Chapter 1 Digital Soil Mapping 1.1 The Fundamentals of Digital Soil Mapping In recent times we have bared witness to the advancement of the computer and information technology ages. With such advances, there have come vast amounts of data and tools in all fields of endeavor. This has motivated numerous initiatives around the world to build spatial data infrastructures aiming to facilitate the collection, maintenance, dissemination and use of spatial information. Soil science potentially contributes to the development of such generic spatial data infrastructure through the ongoing creation of regional, continental and worldwide soil databases, and which are now operational for some uses e.g., land resource assessment and risk evaluation (Lagacherie and McBratney 2006). Unfortunately the existing soil databases are neither exhaustive enough nor precise enough for promoting an extensive and credible use of the soil information within the spatial data infrastructure that is being developed worldwide. The main reason is that their present capacities only allow the storage of data from conventional soil surveys which are scarce and sporadically available (Lagacherie and McBratney 2006). The main reason for this lack of soil spatial data is simply that conventional soil survey methods are relatively slow and expensive. Furthermore, we have also witnessed a global reduction in soil science funding that started in the 1980s (Hartemink and McBratney 2008), which has meant a significant scaling back in wide scale soil spatial data collection and/or conventional soil surveying. To face this situation, it is necessary for the current spatial soil information systems to extend their functionality from the storage and use of digitized (existing) soil maps, to the production of soil maps ab initio (Lagacherie and McBratney 2006). This is precisely the aim of Digital Soil Mapping (DSM) which can be defined as: © Springer International Publishing Switzerland 2017 B.P. Malone et al., Using R for Digital Soil Mapping, Progress in Soil Science, DOI 10.1007/978-3-319-44327-0_1 1
  • 20. 2 1 Digital Soil Mapping The creation and population of spatial soil information systems by numerical models infer- ring the spatial and temporal variations of soil types and soil properties from soil observation and knowledge from related environmental variables. (Lagacherie and McBratney 2006) The concepts and methodologies for DSM were formalized in an extensive review by McBratney et al. (2003). In the McBratney et al. (2003) paper, the scorpan approach for predictive modelling (and mapping) of soil was introduced, which in itself is rooted in earlier works by Jenny (1941) and Russian soil scientist Dokuchaev. scorpan is a mnemonic for factors for prediction of soil attributes: soil, climate, organisms, relief, parent materials, age, and spatial position. The scorpan approach is formulated by the equation: S D f.s; o; r; r; p; a; n/ C or S D f.Q/ C Long-handed, the equation states that the soil type or attribute at an unvisited site (S) can be predicted from a numerical function or model (f) given the factors just described plus the locally varying, spatial dependent residuals ./. The f(Q) part of the formulation is the deterministic component or in other words, the empirical quantitative function linking S to the scorpan factors (Lagacherie and McBratney 2006). The scorpan factors or environmental covariates come in the form of spatially populated digitally available data, for instance from digital elevation models and the indices derived from them—slope, aspect, MRVBF etc. Landsat data, and other remote sensing images, radiometric data, geological survey maps, legacy soil maps and data, just to name a few. For the residuals ./ part of the formulation, we assume there to be some spatial structure. This is for a number of reasons which include that the attributes used in the deterministic component were inadequate, interactions between attributes were not taken into account, or the form of f() was mis-specified. Overall this general formulation is called the scorpan kriging method, where the kriging component is the process of defining the spatial trend of the residuals (with variograms) and using kriging to estimate the residuals at the non-visited sites. Without getting into detail with regards to some of the statistical nuances such as bias issues—which can be prevalent when using legacy soil point data for DSM— that are encountered with using this type of data, the application of scorpan kriging can only be done in extents where there is available soil point data. The challenge therefore is: what to do in situations where this type of data is not available? In the context of the global soil mapping key soil attributes, this is a problem, but can be overcome with the usage of other sources of legacy soil data such as existing soil maps. It is even more of a problem when this information is not available either. However, in the context of global soil mapping, Minasny and McBratney (2010) proposed a decision tree structure for actioning DSM on the basis of the nature of available legacy soil data. This is summarized in Fig. 1.1. But bear in mind that this
  • 21. 1.1 The Fundamentals of Digital Soil Mapping 3 Define an area of interest Assemble environmental covariates Which soil data are available? Assign quality of soil data and coverage in the covariate space Detailed soil maps with legends and soil point data Soil point data Detailed soil maps with legends No data Homosoil Full Cover? Full Cover? Soil maps: - Spatial disaggregation - scorpan kriging - Ensemble Extrapolation from reference areas: - Soil maps - Soil point data - Spatial disaggregation - Spatially weighted mean Increase uncertainty in prediction (depends on the quality of data and complexity of soil cover) Extrapolation from reference areas Spatially weighted mean Yes Yes No No scorpan kriging Fig. 1.1 A decision tree for digital soil mapping based on legacy soil data (Adapted from Minasny and McBratney 2010) decision tree is not constrained only to DSM at a global scale but at any mapping extent where the user wishes to perform DSM given the availability of soil data for their particular area. As can be seen from Fig. 1.1, once you have defined an area of interest, and assembled a suite of environmental covariates for that area, then determined the availability of the soil data there, you follow the respective pathway. scorpan kriging is performed exclusively when there is only point data, but can be used also when there is both point and map data available, e.g., (Malone et al. 2014). The work flow is quite different when there is only soil map information available. Bear in mind that the quality of the soil map depends on the scale and subsequently variation of soil cover; such that smaller scaled maps e.g., 1:100,000 would be considered better and more detailed than large scaled maps e.g., 1:500,000. The elemental basis for extracting soil properties from legacy soil maps comes from the central and distributional concepts of soil mapping units. For example, modal soil profile data of soil classes can be used to quickly build soil property maps. Where mapping units consist of more than one component, we can use a spatially weighted means type method i.e., estimation of the soil properties is based on the modal profile of the components and the proportional area of the mapping unit each component covers, e.g., (Odgers et al. 2012). As a pre-processing step prior to creating soil attribute maps, it may be necessary to harmonize soil mapping units (in the case of adjacent soil maps) and/or perform some type of disaggregation technique in order to retrieve the map unit component information. Some approaches for doing so have
  • 22. 4 1 Digital Soil Mapping been described in Bui and Moran (2003). More recently soil map disaggregation has been a target of DSM interest with a sound contribution from Odgers et al. (2014) for extracting individual soil series or soil class information from convolved soil map units by way of the DSMART algorithm. The DSMART algorithm can best be explained as a data mining with repeated re-sampling algorithm. Furthering the DSMART algorithm, Odgers et al. (2015) then introduced the PROPR algorithm which takes probability outputs from DSMART together with modal soil profile data of given soil classes, to estimate soil attribute quantities (with estimates of uncertainty). What is the process when there is no soil data available at all? This is obviously quite a difficult situation to confront, but a real one at that. The central concept that was discussed by Minasny and McBratney (2010) for addressing these situations is based on the assumed homology of soil forming factors between a reference area and the region of interest for mapping. Malone et al. (2016) provides a further overview of the topic together with a real world application which compared different extrapolating functions. Overall, the soil homologue concept or Homosoil, relative to other areas of DSM research is still in its development. But considering from a global perspective, the sparseness of soil data and limited research funds for new soil survey, application of the Homosoil approach or other analogues will become increasingly important for the operational advancement of DSM. 1.2 What Is Going to Be Covered in this Book? This book covers some of the territory that is described in Fig. 1.1, particularly the scorpan kriging type approach of DSM; as this is probably most commonly undertaken. Also covered is spatial disagregation of polygonal maps. This is framed in the context of updating digital soil maps and downscaling in terms of deriving soil class or attribute information from aggregated soil mapping units. Importantly there is a theme of implementation about this book; a sort of how to guide. So there are some examples of how to create digital soil maps of both continuous and categorical target variable data, given available points and a portfolio of available covariates. The procedural detail is explained and implemented using the R computing language. Subsequently, some effort is required to become literate in this programming language, both for general purpose usage and for DSM and other related soil studies. With a few exceptions, all the data that is used in this book to demonstrate methods, together with additional functions are provided via the R package: ithir. This package can be downloaded free of cost. Instructions for getting this package are in the next chapter. The motivation of the book then shifts to operational concerns and based around real case-studies. For example, the book looks at how we might statistically validate a digital soil map. Another operational study is that of digital soil assessment (Carre et al. 2007). Digital soil assessment (DSA) is akin to the translation of digital soil maps into decision making aids. These could be risk-based assessments, or
  • 23. References 5 assessing threats to soil (erosion, decline of organic matter etc.), and assessing soil functions. These type of assessments can not be easily derived from a digital soil map alone, but require some form of post-processing inference. This could be done with quantitative modeling and or a deep mechanistic understanding of the assessment that needs to be made. A natural candidate in this realm of DSM is land capability or agricultural enterprise suitability. A case study of this type of DSA is demonstrated in this book. Specific topics of this book include: 1. Attainment of R literacy in general and for DSM. 2. Algorithmic development for soil science. 3. General GIS operations relevant to DSM. 4. Soil data preparation, examination and harmonization for DSM. 5. Quantitative functions for continuous and categorical (and combinations of both) soil attribute modeling and mapping. 6. Quantifying digital soil map uncertainty. 7. Assessing the quality of digital soil maps. 8. Updating, harmonizing and disaggregating legacy soil mapping. 9. Digital soil assessment in terms of land suitability for agricultural enterprises. 10. Digital identification of soil homologues. References Bui E, Moran CJ (2003) A strategy to fill gaps in soil survey over large spatial extents: an example from the Murray-Darling basin of Australia. Geoderma 111:21–41 Carre F, McBratney AB, Mayr T, Montanarella L (2007) Digital soil assessments: beyond DSM. Geoderma 142(1–2):69–79 Hartemink AE, McBratney AB (2008) A soil science renaissance. Geoderma 148:123–129 Jenny H (1941) Factors of soil formation. McGraw-Hill, New York Lagacherie P, McBratney AB (2006) Digital soil mapping: an introductory perspective, chapter 1. In: Spatial soil information systems and spatial soil inference systems: perspectives for digital soil mapping. Elsevier, Amsterdam, pp 3–22 Malone BP, Minasny B, Odgers NP, McBratney AB (2014) Using model averaging to combine soil property rasters from legacy soil maps and from point data. Geoderma 232–234:34–44 Malone BP, Jha SK, Minasny AB, McBratney B (2016) Comparing regression-based digital soil mapping and multiple-point geostatistics for the spatial extrapolation of soil data. Geoderma 262:243–253 McBratney AB, Mendonca Santos ML, Minasny B (2003) On digital soil mapping. Geoderma 117:3–52 Minasny B, McBratney AB (2010) Digital soil mapping: bridging research, environmental application, and operation, chapter 34. In: Methodologies for global soil mapping. Springer, Dordrecht, pp 429–425 Odgers NP, Libohova Z, Thompson JA (2012) Equal-area spline functions applied to a legacy soil database to create weighted-means maps of soil organic carbon at a continental scale. Georderma 189–190:153–163 Odgers NP, McBratney AB, Minasny B (2015) Digital soil property mapping and uncertainty estimation using soil class probability rasters. Geoderma 237–238:190–198 Odgers NP, Sun W, McBratney AB, Minasny B, Clifford D (2014) Disaggregating and harmonising soil map units through resampled classification trees. Geoderma 214–215:91–100
  • 24. Chapter 2 R Literacy for Digital Soil Mapping 2.1 Objective The immediate objective here is to skill up in data analytics and basic graphics with R. The range of analysis that can be completed, and the types of graphics that can be created in R is simply astounding. In addition to the wide variety of functions available in the “base” packages that are installed with R, more than 4500 contributed packages are available for download, each with its own suite of functions. Some individual packages are the subject of entire books. For this chapter of the book and the later chapters that will deal with digital soil mapping exercises, we will not be able to cover every type of analysis or plot that R can be used for, or even every subtlety associated with each function covered in this entire book. Given it’s inherent flexibility, R is difficult to master, as one may be able to do with a stand-alone software. R is a software package one can only increase their knowledge and fluency in. Meaning that, effectively, learning R is a boundless pursuit of knowledge. In a disclaimer of sorts, this introduction to R borrows many ideas, and structures from the plethora of online materials that are freely available on the internet. It will be worth your while to do a Google search from time-to-time if you get stuck—you will be amazed to find how many other R users have had the same problems you have or have had. 2.2 Introduction to R 2.2.1 R Overview and History R is a software system for computations and graphics. According to the R FAQ (http://cran.r-project.org/doc/FAQ/R-FAQ.html#R-Basics): © Springer International Publishing Switzerland 2017 B.P. Malone et al., Using R for Digital Soil Mapping, Progress in Soil Science, DOI 10.1007/978-3-319-44327-0_2 7
  • 25. 8 2 R Literacy for Digital Soil Mapping It consists of a language plus a run-time environment with graphics, a debugger, access to certain system functions, and the ability to run programs stored in script files. R was originally developed in 1992 by Ross Ihaka and Robert Gentleman at the University of Auckland (New Zealand). The R language is a dialect of the S language which was developed by John Chambers at Bell Laboratories. This software is currently maintained by the R Development Core Team, which consists of more than a dozen people, and includes Ihaka, Gentleman, and Chambers. Additionally, many other people have contributed code to R since it was first released. The source code for R is available under the GNU General Public Licence, meaning that users can modify, copy, and redistribute the software or derivatives, as long as the modified source code is made available. R is regularly updated, however, changes are usually not major. 2.2.2 Finding and Installing R R is available for Windows, Mac, and Linux operating systems. Installation files and instructions can be downloaded from the Comprehensive R Archive Network (CRAN) site at http://cran.r-project.org/. Although the graphical user interface (GUI) differs slightly across systems, the R commands do not. 2.2.3 Running R: GUI and Scripts There are two basic ways to use R on your machine: through the GUI, where R evaluates your code and returns results as you work, or by writing, saving, and then running R script files. R script files (or scripts) are just text files that contain the same types of R commands that you can submit to the GUI. Scripts can be submitted to R using the Windows command prompt, other shells, batch files, or the R GUI. All the code covered in this book is or is able to be saved in a script file, which then can be submitted to R. Working directly in the R GUI is great for the early stages of code development, where much experimentation and trial-and-error occurs. For any code that you want to save, rerun, and modify, you should consider working with R scripts. So, how do you work with scripts? Any simple text editor works—you just need to save text in the ASCII format i.e., “unformatted” text. You can save your scripts and either call them up using the command source (“file_name.R”) in the R GUI, or, if you are using a shell (e.g., Windows command prompt) then type R CMD BATCH file_name.R. The Windows and Mac versions of the R GUI comes with a basic script editor, shown below in Fig. 2.1. Unfortunately, this editor is not very good by reason that the Windows version does not have syntax highlighting.
  • 26. 2.2 Introduction to R 9 Fig. 2.1 R GUI, its basic script editor, and plot window There are some useful (in most cases, free) text editors available that can be set up with R syntax highlighting and other features. TINN-R is a free text editor http://nbcgib.uesc.br/lec/software/des/editores/tinn-r/en that is designed specifically for working with R script files. Notepad++ is a general purpose text editor, but includes syntax highlighting and the ability to send code directly to R with the NppToR plugin. A list of text editors that work well with R can be found at: http:// www.sciviews.org/_rgui/projects/Editors.html. 2.2.4 RStudio RStudio http://www.rstudio.com/ is an integrated development environment (IDE) for R that runs on Linux, Windows and Mac OS X. We will be using this IDE during the book, generally because it is very well designed, intuitively organized, and quite stable. When you first launch RStudio, you will be greeted by an interface that will look similar to that in Fig. 2.2. The frame on the upper right contains the workspace (where you will be able see all your R objects), as well of a history of the commands that you have previously entered. Any plots that you generate will show up in the region in the lower right
  • 27. 10 2 R Literacy for Digital Soil Mapping Fig. 2.2 The RStudio IDE corner. Also in this region is various help documentation, plus information and documentation regarding what packages and function are currently available to use. The frame on the left is where the action happens. This is the R console. Every time you launch RStudio, it will have the same text at the top of the console telling you the version that is being used. Below that information is the prompt. As the name suggests, this is where you enter commands into R. So lets enter some commands. 2.2.5 R Basics: Commands, Expressions, Assignments, Operators, Objects Before we start anything, it is good to get into the habit of making scripts of our work. With RStudio launched go the File menu, then new, and R Script. A new blank window will open on the top left panel. Here you can enter your R prompts. For example, type the following: 1+1. Now roll your pointer over the top of the panel to the right pointing green arrow (first one), which is a button for running the
  • 28. 2.2 Introduction to R 11 line of code down to the R console. Click this button and R will evaluate it. In the console you should see something like the following: 1 + 1 ## [1] 2 You could have just entered the command directly into the prompt and gotten the same result. Try it now for yourself. You will notice a couple of things about this code. The character is the prompt that will always be present in the GUI. The line following the command starts with a [1], which is simply the position of the adjacent element in the output—this will make some sense later. For the above command, the result is printed to the screen and lost—there is no assignment involved. In order to do anything other than the simplest analyses, you must be able to store and recall data. In R, you can assign the results of commands to symbolic variables (as in other computer languages) using the assignment operator -. Note that other computer scripting languages often use the equals sign (=) as the assignment operator. When a command is used for assignment, the result is no longer printed to the GUI console. x - 1 + 1 x ## [1] 2 Note that this is very different from: x -1 + 1 ## [1] FALSE In this case, putting a space between the two characters that make up the assignment operator causes R to interpret the command as an expression that ask if x is less than zero. However spaces usually do not matter in R, as long as they do not separate a single operator or a variable name. This, for example, is fine: x - 1 Note that you can recall a previous command in the R GUI by hitting the up arrow on your keyboard. This becomes handy when you are debugging code. When you give R an assignment, such as the one above, the object referred to as x is stored into the R workspace. You can see what is stored in the workspace by looking to the workspace panel in RStudio (top right panel). Alternatively, you can use the ls function. ls() ## [1] x
  • 29. 12 2 R Literacy for Digital Soil Mapping To remove objects from your workspace, use rm. rm(x) x As you can see, You will get an error if you try to evaluate what x is. If you want to assign the same value to several symbolic variables, you can use the following syntax. x - y - z - 1 ls() ## [1] x y z R is a case-sensitive language. This is true for symbolic variable names, function names, and everything else in R. x - 1 + 1 x X In R, commands can be separated by moving onto a new line (i.e., hitting enter) or by typing a semicolon (;), which can be handy in scripts for condensing code. If a command is not completed in one line (by design or error), the typical R prompt is replaced with a +. x- + 1+1 There are several operators that are used in the R language. Some of the more common are listed below. Arithmetic + - * / ˆ plus, minus, multiply, divide, power Relational a == b a is equal to b (do not confuse with =) a != b a is not equal to b a b a is less than b a b a is greater than b a = b a is less than or equal to b a = b a is greater than or equal to b Logical/grouping ! not and | or
  • 30. 2.2 Introduction to R 13 Indexing $ part of a data frame [] part of a data frame, array, list [[]] part of a list Grouping commands {} specifying a function, for loop, if statement etc. Making sequences a:b returns the sequence a, a+1, a+2, . . . b Others # commenting (very very useful!) ; alternative for separating commands ~ model formula specification () order of operations, function arguments Commands in R operate on objects, which can be thought of as anything that can be assigned to a symbolic variable. Objects include vectors, matrices, factors, lists, data frames, and functions. Excluding functions, these objects are also referred to as data structures or data objects. When you want to finish up on an R session, RSudio will ask you if you want to “save workspace image”. This refers to the workspace that you have created , i.e., all the objects you have created or even loaded. It is generally good practice to save your workspace after each session. More importantly however, is the need to save all the commands that you have created on your script file. Saving a script file in Rstudio is just like saving a Word document. Give both a go—save the script file and then save the workspace. You can then close RStudio. 2.2.6 R Data Types The term “data type” refers to the type of data that is present in a data structure, and does not describe the data structure itself. There are four common types of data in R: numerical, character, logical, and complex numbers. These are referred to as modes and are shown below: Numerical data x - 10.2 x ## [1] 10.2
  • 31. 14 2 R Literacy for Digital Soil Mapping Character data name - John Doe name ## [1] John Doe Any time character data are entered in the R GUI, you must surround individual elements with quotes. Otherwise, R will look for an object. name - John ## Error in eval(expr, envir, enclos): object ’John’ not found Either single or double quotes can be used in R. When character data are read into R from a file, the quotes are not necessary. Logical data contain only three values: TRUE, FALSE, or NA, (NA indicates a missing value—more on this later). R will also recognize T and F, (for true and false respectively), but these are not reserved, and can therefore be overwritten by the user, and it is therefore good to avoid using these shortened terms. a - TRUE a ## [1] TRUE Note that there are no quotes around the logical values—this would make them character data. R will return logical data for any relational expression submitted to it. 4 2 ## [1] FALSE or b - 4 2 b ## [1] FALSE And finally, complex numbers, which will not be covered in this book, are the final data type in R cnum1 - 10 + (0+3i) cnum1 ## [1] 10+3i You can use the mode or class function to see what type of data is stored in any symbolic variable.
  • 32. 2.2 Introduction to R 15 class(name) ## [1] character class(a) ## [1] logical class(x) ## [1] numeric mode(x) ## [1] numeric 2.2.7 R Data Structures Data in R are stored in data structures (also known as data objects)—these are and will be the that you perform calculations on, plot data from, etc. Data structures in R include vectors, matrices, arrays, data frames, lists, and factors. In a following section we will learn how to make use of these different data structures. The examples below simply give you an idea of their structure. Vectors are perhaps the most important type of data structure in R. A vector is simply an ordered collection of elements (e.g., individual numbers). x - 1:12 x ## [1] 1 2 3 4 5 6 7 8 9 10 11 12 Matrices are similar to vectors, but have two dimensions. X - matrix(1:12, nrow = 3) X ## [,1] [,2] [,3] [,4] ## [1,] 1 4 7 10 ## [2,] 2 5 8 11 ## [3,] 3 6 9 12 Arrays are similar to matrices, but can have more than two dimensions. Y - array(1:30, dim = c(2, 5, 3)) Y ## , , 1 ## ## [,1] [,2] [,3] [,4] [,5]
  • 33. 16 2 R Literacy for Digital Soil Mapping ## [1,] 1 3 5 7 9 ## [2,] 2 4 6 8 10 ## ## , , 2 ## ## [,1] [,2] [,3] [,4] [,5] ## [1,] 11 13 15 17 19 ## [2,] 12 14 16 18 20 ## ## , , 3 ## ## [,1] [,2] [,3] [,4] [,5] ## [1,] 21 23 25 27 29 ## [2,] 22 24 26 28 30 One feature that is shared for vectors, matrices, and arrays is that they can only store one type of data at once, be it numerical, character, or logical. Technically speaking, these data structures can only contain elements of the same mode. Data frames are similar to matrices—they are two-dimensional. However, a data frame can contain columns with different modes. Data frames are similar to data sets used in other statistical programs: each column represents some variable, and each row usually represents an “observation”, or “record”, or “experimental unit”. dat - (data.frame(profile_id = c(Chromosol, Vertosol, Sodosol), FID = c(a1, a10, a11), easting = c(337859, 344059, 347034), northing = c(6372415, 6376715, 6372740), visited = c(TRUE, FALSE, TRUE))) dat ## profile_id FID easting northing visited ## 1 Chromosol a1 337859 6372415 TRUE ## 2 Vertosol a10 344059 6376715 FALSE ## 3 Sodosol a11 347034 6372740 TRUE Lists are similar to vectors, in that they are an ordered collection of elements, but with lists, the elements can be other data objects (the elements can even be other lists). Lists are important in the output from many different functions. In the code below, the variables defined above are used to form a list. summary.1 - list(1.2, x, Y, dat) summary.1 ## [[1]] ## [1] 1.2 ## ## [[2]] ## [1] 1 2 3 4 5 6 7 8 9 10 11 12 ## ## [[3]] ## , , 1 ##
  • 34. 2.2 Introduction to R 17 ## [,1] [,2] [,3] [,4] [,5] ## [1,] 1 3 5 7 9 ## [2,] 2 4 6 8 10 ## ## , , 2 ## ## [,1] [,2] [,3] [,4] [,5] ## [1,] 11 13 15 17 19 ## [2,] 12 14 16 18 20 ## ## , , 3 ## ## [,1] [,2] [,3] [,4] [,5] ## [1,] 21 23 25 27 29 ## [2,] 22 24 26 28 30 ## ## ## [[4]] ## profile_id FID easting northing visited ## 1 Chromosol a1 337859 6372415 TRUE ## 2 Vertosol a10 344059 6376715 FALSE ## 3 Sodosol a11 347034 6372740 TRUE Note that a particular data structure need not contain data to exist. This may seem unusual, but it can be useful when it is necessary to set up an object for holding some data later on. x - NULL 2.2.8 Missing, Indefinite, and Infinite Values Real data sets often contain missing values. R uses the marker NA (for “not available”) to indicate a missing value. Any operation carried out on an NA will return NA. x - NA x - 2 ## [1] NA Note that the NA used in R does not have the quotes around it—this would make it character data. To determine if a value is missing, use the is.na—this function can also be used to set elements in a data object to NA. is.na(x) ## [1] TRUE
  • 35. 18 2 R Literacy for Digital Soil Mapping !is.na(x) ## [1] FALSE Indefinite values are indicated with the marker NaN, for “not a number”. Infinite values are indicated with the markers Inf or -Inf. You can find these values with the functions is.infinite, is.finite, and is.nan. 2.2.9 Functions, Arguments, and Packages In R, you can carry out complicated and tedious procedures using functions. Functions require arguments, which include the object(s) that the function should act upon. For example, the function sum will calculate the sum of all of its arguments. sum(1, 12.5, 3.33, 5, 88) ## [1] 109.83 The arguments in (most) R functions can be named, i.e., by typing the name of the argument, an equal sign, and the argument value (arguments specified in this way are also called tagged). For example, for the function plot, the help file lists the following arguments. plot (x, y,...) Therefore, we can call up this function with the following code. a - 1:10 b - a plot(x = a, y = b) With names arguments, R recognizes the argument keyword (e.g., x or y) and assigns the given object (e.g., a or b above) to the correct argument. When using names arguments, the order of the arguments does not matter. We can also use what are called positional arguments, where R determines the meaning of the arguments based on their position. plot(a, b) This code does the same as the previous code. The expected position of arguments can be found in the help file for the function you are working with or by asking R to list the arguments using the args function. args(plot) ## function (x, y, ...) ## NULL
  • 36. 2.2 Introduction to R 19 It usually makes sense to use the positional arguments for only the first few arguments in a function. After that, named arguments are easier to keep track of. Many functions also have default argument values that will be used if values are not specified in the function call. These default argument values can be seen by using the args function and can also be found in the help files. For example, for the function rnorm, the arguments mean and sd have default values. args(rnorm) ## function (n, mean = 0, sd = 1) ## NULL Any time you want to call up a function, you must include parentheses after it, even if you are not specifying any arguments. If you do not include parentheses, R will return the function code (which at times might actually be useful). Note that it is not necessary to use explicit numerical values as function arguments—symbolic variable names which represent appropriate data structure can be used. it is also possible to use functions as arguments within functions. R will evaluate such expressions from the inside outward. While this may seem trivial, this quality makes R very flexible. There is no explicit limit to the degree of nesting that can be used. You could use: plot(rnorm(10, sqrt(mean(c(1:5, 7, 1, 8, sum(8.4, 1.2, 7))))), 1:10) The above code includes 5 levels of nesting (the sum of 8.4,1.2 and 7 is combined with the other values to form a vector, for which the mean is calculated, then the square root of this value is taken and used as the standard deviation in a call to rnorm, and the output of this call is plotted). Of course, it is often easier to assign intermediate steps to symbolic variables. R evaluates nested expressions based on the values that functions return or the data represented by symbolic variables. For example, if a function expects character data for a particular argument, then you can use a call to the function paste in place of explicit character data. Many functions (including sum, plot, and rnorm) come with the R “base packages”, i.e., they are loaded and ready to go as soon as you open R. These packages contain the most common functions. While the base packages include many useful functions, for specialized procedures, you should check out the content that is available in the add-on packages. The CRAN website currently lists more than 4500 contributed packages that contain functions and data that users have contributed. You can find a list of the available packages at the CRAN website http:// cran.r-project.org/. During the course of this book and described in more detail later on, we will be looking and using a number of specialized packages for application of DSM. Another repository of R packages is the R-Forge website https://r-forge.r- project.org/. R-Forge offers a central platform for the development of R packages, R-related software and further projects. Packages in R-Forge are not necessarily always on the CRAN website. However, many packages on the CRAN website are developed in R-Forge as ongoing projects. Sometimes to get the latest changes
  • 37. 20 2 R Literacy for Digital Soil Mapping made upon a package, it pays to visit R-Forge first, as the uploading of the revised functions to CRAN is not instantaneous. To utilize the functions in contributed R packages, you first need to install and then load the package. Packages can be installed via the packages menu in the right bottom panel of RStudio (select the “packages” menu, then “install packages”). Installation could be retrieved from the nearest mirror site (CRAN server location)—you will need to have first selected this by going to the tools, then options, then packages menu where you can then select the nearest mirror site from a suite of possibles. Alternatively, you may just install a package from a local zip file. This is fine, but often when using a package, there are other peripheral packages (or dependencies) that also need to be loaded (and installed). If you install the package from CRAN or a mirror site, the dependency packages are also installed. This is not the case when you are installing packages from zip files—you will also have to manually install all the dependencies too. Or just use the command: install.packages(package name) where “package name” should be replaced with the actual name of the package you want to install, for example: install.packages(Cubist) This command will install the package of functions for running the Cubist rule- based machine learning models for regression. Installation is a one-time process, but packages must be loaded each time you want to use them. This is very simple, e.g., to load the package Cubist, use the following command. library(Cubist) Similarly, if you want to install an R package from R-Forge (another popular hosting repository for R packages) you would use the following command: install.packages(package name, repos = http://R-Forge.R-project.org) Other popular repositories for R packages include Github and BitBucket. These repositories as well as R-Forge are version control systems that provide a central place for people to collaborate on everything from small to very large projects with speed and efficiency. The companion R package to this book, ithir is hosted on Bitbucket for example. ithir contains most of the data, and some important functions that are covered in this book so that users can replicate all of the analyses contained within. ithir can be downloaded and installed on your computer using the following commands: library(devtools) install_bitbucket(brendo1001/ithir/pkg) library(ithir)
  • 38. 2.2 Introduction to R 21 The above commands assumes your have already installed the devtools package. Any package that you want to use that is not included as one of the “base” packages, needs to be loaded every time you start R. Alternatively, you can add code to the file Rprofile.site that will be executed every time you start R. You can find information on specific packages through CRAN, by browsing to http://cran.r-project.org/ and selecting the packages link. Each package has a separate web page, which will include links to source code, and a pdf manual. In RStudio, you can select the packages tab on the lower right panel. You will then see all the package that are currently installed in your R environment. By clicking onto any package, information on the various functions contained in the package, plus documentation and manuals for their usage. It becomes quite clear that within this RStudio environment, there is at your fingertips, a wealth of information for which to consult whenever you get stuck. When working with a new package, it is a good idea to read the manual. To “unload” functions, use the detach function: detach(package:Cubist) For tasks that you repeat, but which have no associated function in R, or if you do not like the functions that are available, you can write your own functions. This will be covered a little a bit later on. Perhaps one day you may be able to compile all your functions that you have created into a R package for everyone else to use. 2.2.10 Getting Help It is usually easy to find the answer about specific functions or about R in general. There are several good introductory books on R. For example, “R for Dummies”, which has had many positive reviews http://www.amazon.com/R-Dummies-Joris- Meys/dp/1119962846.You can also find free detailed manuals on the CRAN web- site. Also, it helps to keep a copy of the “R Reference Card”, which demonstrates the use of many common functions and operators in 4 pages http://cran.r-project. org/doc/contrib/Short-refcard.pdf. Often a Google search https://www.google.com. au/ of your problem can be a very helpful and fruitful exercise. To limit the results to R related pages, adding “cran” generally works well. R even has an internet search engine of sorts called rseek, which can be found at http://rseek.org/—it is really just like the Google search engine, but just for R stuff! Each function in R has a help file associated with it that explains the syntax and usually includes an example. Help files are concisely written. You can bring up a help file by typing ? and then the function name. ?cubist This will bring up the help file for the cubist function in the help panel of RStudio. But, what if you are not sure what function you need for a particular task? How can you know what help file to open? In addition to the sources given
  • 39. Other documents randomly have different content
  • 40. together all right and are happy, and then wake up and find that’s a dream, and you’re in jail for murder and can’t never get out alive. “Then they proved about how the poker just fit into the place in her head, and how it was took back into the kitchen and put into the ashes again, so ‘twouldn’t show, and how far I drove that day, and ever’ saloon I stopped into on the way, and just how much I drank, and ever’thing I done, except the beefsteak I bought and that half peck of potatoes that I gave away to the old lady. Then they proved all about my runnin’ away, and where I’d been, and what I’d done, and my changin’ my name, and the way I was caught. “A good many times my lawyer objected to something that they tried to prove, or to something that the other feller was sayin’, but ever’ time the judge decided ‘gainst my lawyer, and he ‘most always seemed kind of mad when my lawyer said anything. The other one was a good deal the smartest; ever’one said he wanted to be a judge, and he took all the murder cases he could get, and they called him the ‘hangin’ lawyer,’ because ever’one he had anything to do with got hung. “There was always a big crowd in the court room ever’ day, and a lot of people waitin’ outside to get in, and there was always some awfully nice dressed ladies settin’ up there with the judge ever’ day, and they had a sort of glass in their hands, and they’d hold it up in front of their eyes and look at me through the glass just like the judge looked at the paper. “It took about two days for their side to call all the witnesses they had, and finally their lawyer got up just as solemn and said that was their case. “Then the judge give them a few minutes recess for ever’body to walk around a little, and ever’one looked at me, just as they’d done all the time. When they come to order the judge told us to go on with our side. My lawyer turned to me and said he didn’t see what use it was to prove anything, and we might just as well let the case go the way it was. I said I ought to go on the stand and tell about
  • 41. that paper, and how it was nothin’ but the one that come around the beef, and he said they wouldn’t believe me if I said it. And anyhow it wouldn’t make any difference. If I once got on the stand they’d get me all mixed up and the first thing I knew I’d tell ‘em all about ever’thing, and so far as witnesses went he couldn’t find anyone to do me any good. “I thought ‘twould look pretty bad not to give any evidence at all, and he said he knew that but ‘twould look a mighty sight worse if we put any in. So my lawyer got up and ever’one watched to see what he was goin’ to do, and then he just said ‘May it please the court, we have concluded not to put in any evidence.’ And ever’one commenced to whisper, and to look at me, and to look ‘round, and the judge looked queer and kind of satisfied, and said then if there was no evidence on our side they would take a recess till mornin’ when they could argue the case. Of course, after I went back to the cell and got to thinkin’ it over I could see that it was all off more’n ever, but I didn’t see that the lawyer could have done any different.” Here Jim got up and went to the grating and called to the guard. “I’m gettin’ a little tired and fagged out and it ain’t worth while to go to bed. Won’t you just give me some more whiskey?” The guard came up to the door. “Of course, you can have all the whiskey you want,” he said. “Here’s a bottle I’ve just fetched up from the office. You’d better drink that up and then I’ll get you some more.” Jim took a long drink at the bottle, and then passed it to his friend. Hank was glad to have something to help him through the ordeal, which had been hard for him to bear. Presently the guard came back to the grating and asked Jim what he wanted for breakfast. “It ain’t breakfast time yet, is it?” Jim gasped.
  • 42. “No, but I’m going to the office after a while and I want to give the order when I go. You’d better tell me now. You can have ‘most anything you want. You can have ham and eggs, or bacon or steak, and tea or coffee, and bread and butter and cakes; or all of ‘em—or anything else you want.” “Well, I guess you’d better bring me ham and eggs. I don’t seem to care for steak, and I don’t think I want any coffee. I’d rather have a cocktail. You’d better bring me plenty more whiskey too when you come. You know I hain’t slept any and I’m kind of nervous. I guess it’ll be better if I don’t know much about it; don’t you?” “Sure thing,” the guard answered back. “We’ve got some Scotch whiskey over there that’s all right. I’ll bring you some of that. All the boys takes that. I don’t think you’ll be troubled much after a good drink of that Scotch. I guess you’d better hurry up a little bit with what you want to say. I don’t like to hurry you any, but I’m afraid they’ll be along with the breakfast after while, and they don’t allow any visitors after that.” The guard turned to leave, but before he had gone far, Jim called out, “You’d better telephone over to the telegraph office, hadn’t you? Somethin’ might have come maybe.” “All right, I’ll do that,” the guard answered back, “and Jim, I guess you might as well put on them new clothes before breakfast; they’ll look better’n the old ones—to eat in.”
  • 43. X im drank the remnant of whiskey in the bottle he was holding, draining it to the last drop. As he sat in his chair he leaned against the side of the cell. “My—how many bottles of this stuff I’ve drunk tonight. It’s a wonder I ain’t dead already. I don’t believe I could keep up only I’ve got to finish my story. But this cell begins to swim ‘round pretty lively; I guess it ain’t goin’ to take much to finish me. Think a little of that Scotch will just about do the job. I don’t care what anyone says, I’m goin’ to get just as drunk as I can. I sha’n’t live to see what they say in the newspapers and it won’t make any difference when I’m dead. I don’t know as I ought to eat anything; it might kind of keep it from actin’, but still I might as well. I guess the Scotch’ll do it all right anyway. “Well, there ain’t very much more to tell, and I guess you’re glad. It’s been a tough night on you, poor feller. I hope no one’ll ever have to do it for you. But, say—you’ve done me lots of good! I don’t know how I’d put in the night, if you hadn’t come! “Well—the last mornin’ they took me over to court, the room was jammed more’n ever before, and a big crowd was waitin’ outside. I heard the other lawyer say that the judge’s platform looked like a reception; anyhow it was full of ladies with perfectly grand clothes, and most of ‘em would hold their glasses up to look at me. The other lawyer didn’t say much in his first speech, only to tell how it was all done, and how they had proved that everything happened in Cook County, and what a high office the jury had.
  • 44. “Then my lawyer talked for me. I didn’t really see how he could have done any better and the papers all said he done fine. Of course there wa’n’t much to say. I done it, and what more was there to it? And yet I s’pose a lawyer is educated so he can talk all right on either side. Well, my lawyer went on to make out that no one had seen it done, that the evidence was all circumstantial, and no one ever ought to be hung on circumstantial evidence. He went on to show how many mistakes had been made on circumstantial evidence, and he told about a lot of cases. He told the jury about one that I think happened in Vermont where two farmers was seen goin’ out in the field. They hadn’t been very good friends for a long time. Someone heard loud voices and knew they was fightin’. Finally one of ‘em never come back and afterwards some bones or somethin’ was found, that the doctors said was a farmer’s bones. Well, they tried that farmer and found him guilty, and hung him. And then years afterwards the other man come back. And he’d just wandered off in a crazy fit. And after a while another doctor found out that them bones was only sheep bones, and they’d hung an innocent man. He told a lot of stories of that kind, and some of the jury seemed to cry when he told ‘em, but I guess they was cryin’ for the Vermont man and not for me. “After my lawyer got through the other lawyer had one more chance, and he was awful hard on me. He made out that I was the worst man that ever lived. He claimed that I had made up my mind to kill her long ago, just to get rid of her, and that I went ‘round to all the saloons that day and drank just to get up my nerve. Then he claimed that I took a bottle of whiskey home and drank it up and left the empty bottle on the table, and I took that just to nerve me up. He made more out of the brown paper than he did of anything else, and told how I burned all the rest of the evidence but had forgot to burn this, and how I’d gone into the kitchen and got the poker out of the stove and come back into the settin’-room and killed her, and then took it back; and how cold-blooded I was to take her, after I’d killed her, and go and dump her into that hole away out on the prairie, and how I’d run away, and how that proved I’d killed her,
  • 45. and then he compared me with all the murderers who ever lived since Cain, ‘most, and showed how all of ‘em was better’n I was, and told the jury that nobody in Chicago would be safe unless I was hung; and if they done their duty and hung me there wouldn’t be any more killin’ in Chicago after this. I can’t begin to tell you what all he said; but it was awful! Once in a while when it was too bad, my lawyer would interrupt, but the judge always decided against me and then the other lawyer went on worse’n before. The papers next day told how fast I changed color while he was talkin’, and what a great speech he made, and they all said he ought to be a judge because he was so fearless. “It took the crowd some time to quiet down after he got through and then the judge asked the jury to stand up, and they stood up, and he read a lot of stuff to ‘em, tellin’ ‘em about the case. ‘Most all that he read was ‘gainst me. Sometimes I thought he was readin’ one on my side, and he told ‘em how sure they must be before they could convict, and then he’d wind up by sayin’ they must be sure it was done in Cook County. Of course there never was any doubt but what it all happened in Cook County. When the judge got through ‘twas most night, and he told the bailiff to take charge of the jury, so he took ‘em and the clothes and the brown paper with the blood out in the jury room, and they han’-cuffed me and took me back to my cell. “I don’t believe I ever put in any night that was quite so hard on me —exceptin’ mebbe the night I done it—as that one when the jury was out. I guess ever’one thought they wouldn’t stay long. I couldn’t see that any of ‘em ever looked at me once as if they cared whether I lived or died. I don’t believe that they really thought I was a man like them; anyhow ever’-one thought they would sentence me to hang in just a few minutes. I s’posed myself that they’d be in before supper. My lawyer come over to the jail with me, because he knew how I felt. And anyhow he was ‘most as nervous as I was. After a while they brought me in my supper, and the lawyer went out to get his. Then the guard told me the jury had gone to supper, and he guessed there was some hitch about it, though ever’one thought the
  • 46. jury wouldn’t be out long. After a while the lawyer came back, and he stayed and talked to me until nine or ten o’clock, and the jury didn’t come in, so he went to see what was the matter, and come back and said he couldn’t find out anything, only that they hadn’t agreed. “Well, he stayed till twelve o’clock, and then the judge went home, and we knew they wa’n’t goin’ to come in till mornin’. I couldn’t sleep that night, but walked back and forth in the cell a good bit of the time. You see it wa’n’t this cell. The one I had then was a little bigger. I’d lay down once in a while, and sometimes I’d smoke a cigar that the guard gave me. Anyhow I couldn’t really sleep, and was mighty glad when daylight come. In the mornin’, kind of early, I heard that jury had agreed and I knew that ‘twas bad for me. The best that could happen would be a disagreement. I hadn’t allowed myself to have much hope any of the time, but I knew that now it was all off. “Still I waited and didn’t quite give up till they took me back to the courtroom. Then when ever’one had got their places the jury come in, lookin’ awful solemn, and the judge looked sober and fierce-like, and he said, ‘Gentlemen of the Jury, have you agreed on your verdict?’ And the foreman got up and said, ‘We have.’ Then the judge told the foreman to give the verdict to the clerk. He walked over to the row of chairs and the man at the end of the bottom row reached out his hand and gave the paper to him. The people in the room was still as death. Then the clerk read, ‘We, the jury, find the defendant guilty, and sentence him to death.’ I set with my head down, lookin’ at the paper; I expected it, and made up my mind not to move. Ever’one in the courtroom sort of give a sigh. I never looked up, and I don’t believe I moved. The papers next day said I was brazen and had no feelin’, even when the jury sentenced me to death. “The judge was the first one to speak. He turned to the jury and thanked ‘em for their patriotism and devotion, and the great courage they’d shown by their verdict. He said they’d done their duty well
  • 47. and could now go back to their homes contented and happy. And he says: ‘Mr. Sheriff, remove the prisoner from the room.’ Of course, I hadn’t expected nothin’, and still I wa’n’t quite sure—the same as now, when I think mebbe the governor’ll change his mind. But when the verdict was read and they said it was death, somehow I felt kind of dazed. I don’t really remember their puttin’ the han’-cuffs on me, and takin’ me back to jail. I don’t remember the crowd in the courtroom, or much of anything until I was locked up again, and then my lawyer come and said he would make a motion for a new trial, and not to give up hope. My lawyer told me that the reason they was out so long was one man stuck out for sendin’ me to the penitentiary for life instead of hangin’ me. We found out that he used to be a switchman. I s’pose he knew what a hard life I had and wanted to make some allowances. The State’s Attorney said he’d been bribed, and the newspapers had lots to say about investigatin’ the case, but there wa’n’t nothin’ done about it. But I s’pose mebbe it had some effect on the next case. “There wa’n’t nothin’ more done for two or three days. I just stayed in my cell and didn’t feel much like talkin’ with anyone. Then my lawyer come over and said the motion for a new trial would be heard next day. In the mornin’ they han’cuffed me and took me back as usual. There was a lot of people in the courtroom, though not so many as before. My lawyer had a lot of books, and he talked a long while about the case, and told the judge he ought to give me a new trial on account of all the mistakes that was made before. And after he got done the judge said he’d thought of this case a great deal both by day and by night, and he’d tried to find a way not to sentence me to death, but he couldn’t do it, and the motion would be overruled. Then he said, ‘Jackson, stand up.’ Of course I got up, because he told me to. Then he looked at me awful savage and solemn and said, ‘Have you got anything to say why sentence should not be passed on you?’ and I said ‘No!’ Then he talked for a long time about how awful bad I was, and what a warnin’ I ought to be to ever’body else; and then he sentenced me to be removed to the county-jail and on Friday, the thirteenth day of this month—that’s
  • 48. today—to be hanged by the neck till dead, and then he said, ‘May God have mercy on your soul!’ After that he said, ‘Mr. Sheriff, remove the prisoner. Mr. Clerk, call the next case.’ And they han’-cuffed me and brought me back. “I don’t know why the judge said, ‘May God have mercy on your soul!’ I guess it was only a kind of form that they have to go through, and I don’t think he meant it, or even thought anything about it. If he had, I don’t see how he really could ask God to have mercy on me unless he could have mercy himself. The judge didn’t have to hang me unless he wanted to. “Well, the lawyer come in and told me he ought to appeal the case to the Supreme Court, but it would cost one hundred dollars for a record, and he didn’t know where to get the money. I told him I didn’t know either. Of course I hadn’t any and told him he might just as well let it go; that I didn’t s’pose it would do any good anyhow. But he said he’d see if he could find the money somehow and the next day he come in and said he was goin’ to give half out of his own pocket, and he’d seen another feller that didn’t want his name mentioned and that thought a man oughtn’t to be hung without a chance; he was goin’ to give the other half. Of course I felt better then, but still I thought there wa’n’t much chance, for ever’body was against me, but my lawyer told me there was a lot of mistakes and errors in the trial and I ought to win. “Well, he worked on the record and finally got it finished, a great big kind of book that told all about the case. It was only finished a week ago, and I s’posed anyone could take his case to the Supreme Court if he had the money; but my lawyer said no, he couldn’t, or rather he said yes, anyone could take his case to the Supreme Court, but in a case like mine, where I was to be hung I’d be dead before the Supreme Court ever decided it, or even before it was tried. Then he said the only way would be if some of the judges looked at the record and made an order that I shouldn’t be hung until after they’d tried the case, but he told me it didn’t make any difference how many mistakes the judge had made, or how many errors there was,
  • 49. they wouldn’t make any order unless they believed I hadn’t done it. He said that if it had been a dispute about a horse or a cow, or a hundred dollars, I’d have a right to go to the Supreme Court, and if the judges found any mistakes in the trial I’d have another chance. But it wa’n’t so when I was tried for my life. “Well, when he’d explained this I felt sure ‘twas all off, and I told him so, but he said he was goin’ to make the best fight he could and not give up till the end. He said he had a lot at stake himself, though not so much as I had. So he took the record and went to the judges of the Supreme Court and they looked it over, and said mebbe the judge that tried me did make some mistakes, and mebbe I didn’t have a fair trial, but it looked as if I was guilty and they wouldn’t make any order. So my case never got into the Supreme Court after all and the hundred dollars was wasted. “Well, when my lawyer told me, of course I felt blue. I’d built some on this, and it begun to look pretty bad. It seemed as if things was comin’ along mighty fast, and it looked as if the bobbin was ‘most wound up. When you know you’re going to die in a week the time don’t seem long. Of course if a feller’s real sick, and gets run down and discouraged, and hasn’t got much grip on things, he may not feel so very bad about dyin’, for he’s ‘most dead anyway, but when a feller’s strong, and in good health, and he knows he’s got to die in a week, it’s a different thing. “Then my lawyer said there was only one thing left, and that was to go to the gov’nor. He said he knew the gov’nor pretty well and he was goin’ to try. He thought mebbe he’d change the sentence to imprisonment for life. When I first come to jail I said I’d rather be hung than to be sent up for life, and I stuck to it even when the jury brought in their verdict, but when it was only a week away I begun to feel different, and I didn’t want to die, leastwise I didn’t want to get hung. So I told him all the people I knew, though I didn’t think they’d help me, for the world seemed to be against me, and the papers kept tellin’ what a good thing it was to hang me, and how the State’s Attorney and the jury and the judge had been awful
  • 50. brave to do it so quick. But I couldn’t see where there was any bravery in it. I didn’t have no friends. It might have been right, but I can’t see where the brave part come in. “But every day the lawyer said he thought the gov’nor would do somethin’, and finally he got all the names he could to the petition, and I guess it wa’n’t very many, only the people that sign all the petitions because they don’t believe in hangin’; and day before yesterday, he went down to Springfield to see the gov’nor. “Well, I waited all day yesterday. I didn’t go out of the cell for exercise because I couldn’t do anything and I didn’t want ‘em to see how nervous I was. But I tell you it’s ticklish business waitin’ all day when you’re goin’ to be hung in the mornin’ unless somethin’ happens. I kep’ askin’ the guard what time ‘twas, and when I heard anyone comin’ up this way I looked to see if it wa’n’t a despatch, and I couldn’t set down or lay down, or do anything ‘cept drink whiskey. I hain’t really been sober and clear-headed since yesterday noon, in fact, I guess if I had been, I wouldn’t kep’ you here all night like this. I didn’t hardly eat a thing, either, all day, and I asked the guard about it a good many times, and he felt kind of sorry for me but didn’t give me much encouragement. You see they’ve had a guard right here in front of the door all the time, day and night, for two weeks. That’s called the death watch, and they set here to see that I don’t kill myself, though I can’t see why that would make any great difference so long as I’ve got to die anyhow. “Well, ‘long toward night the guard came and brought me that new suit of clothes over on the bed, and I guess I’ve got to put ‘em on pretty quick. Of course, the guard’s been as nice as he could be. He didn’t tell me what they’s for, but I knew all the same. I know they don’t hang nobody in their old clothes. I s’pose there’ll be a good many people there, judges and doctors and ministers and lawyers, and the newspapers, and the friends of the sheriff, and politicians, and all, and of course it wouldn’t look right to have me hung up there before ‘em all in my old clothes,—it would be about like wearin’ old duds to a party or to church—so I’ve got to put on them
  • 51. new ones. They’re pretty good, and they look as if they’re all wool, don’t you think? “Well, a little while after they brought me the clothes, I seen the guard come up with a telegram in his hand. I could see in his face it wa’n’t no use, so of course I wa’n’t quite so nervous when I read it. But I opened it to make sure. The lawyer said that the gov’nor wouldn’t do nothin’. Then, of course, ‘twas all off. Still he said he’d go back about midnight. I don’t know whether he meant it, or said it to brace me up a little and kind of let me down easier. “Of course, the gov’nor could wake up in the night and do it, if he wanted to, and I s’pose such things has been done. I’ve read ‘bout ‘em stoppin’ it after a man got up on the scaffold. You remember about the gov’nor of Ohio, don’t you? He come here to Chicago to some convention, and a man was to be hung in Columbus that day, and the gov’nor forgot it till just about the time, and then he tried for almost an hour to get the penitentiary on the long distance telephone, and he finally got ‘em just as the man was goin’ up on the scaffold. Such things has happened, but of course, I don’t s’pose they’ll happen to me. I never had much luck in anything, and I guess I’ll be hung all right. “It seems queer, don’t it, how I’m talkin’ to you here, and the guard out there, and ever’body good to me, and in just a little while they’re goin’ to take me out there and hang me! I don’t believe I could do it, even if I was a sheriff and got ten thousand dollars a year for it, but I s’pose it has to be done. “Well, now I guess I’ve told you all about how ever’thing happened and you und’stand how it was. I s’pose you think I’m bad, and I don’t want to excuse myself too much, or make out I’m any saint. I know I never was, but you see how a feller gets into them things when he ain’t much different from ever’body else. I know I don’t like crime, and I don’t believe the other does. I just got into a sort of a mill and here I am right close up to that noose.
  • 52. “There ain’t anyone ‘specially that I’ve got to worry about, ‘cept the boy. Of course it’s awful hard for a poor feller to start, anyhow, unless he’s real smart, and I don’t know how ‘twill be with the boy. We always thought he was awful cunnin’; but I s’pose most parents does. But I don’t see how he’d ever be very smart, ‘cause I wa’n’t and neither was his mother. As I was sayin’, ‘twould be awful hard for him anyhow, but now when he’s growed up, and anyone tells him about how his mother was murdered by his father, and how his father got hung for it, and they show him the pictures in the paper and all that, I don’t see how he’ll ever have any show. It seems as if the state had ought to do somethin’ for a child when the state kills its father that way, but it don’t unless they sends him to a poor house, or something like that. “Now, I haven’t told you a single lie—and you can see how it all was, and that I wa’n’t so awful bad, and that I’m sorry, and would be willin’ to die if it would bring her back. And if you can, I wish you’d just kind of keep your eye on the boy. I guess it’ll be a good deal better to change his name and not let him nor anyone else know anything about either of us. A good many poor people grow up that way. I don’t really know nothin’ ‘bout my folks. They might’ve been hung too, for all I know. But you kind of watch the boy and keep track of him, and if he comes up all right and seems to be a smart feller and looks at things right, and he gets to wonderin’ about me, and you think ‘twill do any good you can tell him just what you feel a mind to, but don’t tell him ‘less’n you think it will do him good. Of course, I can’t never pay you in any way for what you’ve done for me, but mebbe you’ll think it’s worth while for a feller that hain’t a friend in the world, and who’s got to be hung so quick.” Hank struggled as hard as he could to keep back the tears. He was not much used to crying, but in spite of all his efforts they rolled down his face. “Well, Jim, old feller,” he said. “I didn’t know how it was—when I come I felt as if you’d been awful bad, and of course I know it wa’n’t right, but somehow I know it might have happened to me, or ‘most
  • 53. anybody, almost, and that you ain’t so bad. I can’t tell you anything about how I feel, but I’m glad I come. It’s done me good. I don’t think I’ll ever feel the same about the fellers that go to jail and get hung. I don’t know’s they could help it any more’n any of us can help the things we do. Anyhow, I sha’n’t never let the boy out of my mind a single minit, and I’ll do as much for him as if he was mine. I’ll look him up the first thing I do. I don’t know about changin’ his name, I’ll see. Anyhow, if he ever gets to hear a bit of it, I’ll see he knows how it was.” Jim wrung Hank’s hand for a minute in silence, and then said: “And just one word more, Hank; tell him not to be poor; don’t let him get married till he’s got money, and can afford it, and don’t let him go in debt. You know I don’t believe I ever would have done it if I hadn’t been so poor.” Hank drew back his hand and stepped to the grated door and looked out along the gloomy iron corridors and down toward the courtyard below. Then he looked up at the tiers of cells filled with the hapless outcasts of the world. On the skylight he could see the faint yellowish glow that told him that the day was about to dawn. The guard got up from his stool and passed him another flask of whiskey. “Here, you’d better get Jim to drink all he can,” he whispered, “for his time is almost up.” Hank took a little sip himself, and then motioned Jim to drink. Jim took the bottle, raised it to his mouth and gulped it down, scarcely stopping to catch his breath. Then he threw the bottle on the bed and sat down on his chair. With the story off his mind it was plain that the whiskey was fast numbing all his nerves. He was not himself when he looked up again. “I guess mebbe I’d better change my clothes, while I have a chance,” he said. “I don’t want anyone else to have to do it for me, and I want to look all right when the thing comes off.” A new guard came up to the door, unlocked it and came in. He nodded to Hank and told him he must go.
  • 54. “His breakfast is just comin’ up and it’s against the rules to have anyone here at the time. The priest will come to see him after he gets through eatin’.” Over in the corridor where Hank had seen the beams and lumber he could hear the murmur of muffled voices, evidently talking about the work. Along the corridor two waiters in white coats were bringing great trays filled with steaming food. Slowly Hank turned to Jim and took his hand. “Well, old fellow,” he said, “I’ve got to go. I see you’re all right, but take that Scotch whiskey when it comes; it won’t do you any hurt. I’ll look after everything just as I said. Good-bye.” Jim seemed hardly to hear Hank’s farewell words. “Well, good-bye.” Hank went outside the door and the guard closed and locked it as he turned away. Then Jim got up from his chair and stumbled to the door. “Hank! Hank! S’pose—you—stop at the—telegraph—office—the Western Union—and the—Postal—all of ‘em—mebbe—might—be somethin’——” “All right,” Hank called back, “I will! I will!—I’ll go to both to make sure if there’s anything there; and I’ll telephone you by the time you’ve got through eatin’.”
  • 55. T BIG BLUE BOOKS 30c EACH POSTPAID TO ANY ADDRESS hese Big Blue Books are a companion series to the Little Blue Books. They are much larger-–5½×8½ inches in size, bound in attractive stiff card covers and contain from 30,000 to 75,000 words of text, ranging from 64 to 128 pages each. The type is large, clear and easy to read. The books are printed on good book paper and are thoroughly substantial, accurate, and worth while in every way. Make your selection now—one book or more, up to any quantity you wish, for 30c per book postpaid to any address in the world. Always Order by Number-–30c Each LOVE AND SEX B–46 The Sexual Life of Man, Woman and Child. Dr. Isaac Goldberg. (Chapters include “Sex,” “From Morality to Taste,” “Lust and Love,” etc.) B–41 Love’s Coming of Age: A Series of Papers on the Relations of the Sexes. Edward Carpenter. (Chapters include “Sex-Passion,” “Man the Ungrown,” “Woman the Serf,” “Intermediate Sex,” “Note on Preventive Checks to Population,” etc.) B–32 The History of a Woman’s Heart (Une Vie). Guy de Maupassant. (Complete novel by the famous French master of fiction.) B–3 The Love Sorrows of Young Werther. Goethe. (Famous love story).
  • 56. FICTION B–6 Zadig, or Destiny; Micromegas and The Princess of Babylon. Voltaire. (Famous satirical fiction.) B–30 Candide: A Satire on the Notion That This Is the Best of All Possible Worlds. Voltaire. B–12 Grimm’s Famous Fairy Tales. B–24 An Eye for an Eye. Clarence Darrow. (Complete Novel.) B–33 A Sentimental Journey Through France and Italy. Laurence Sterne. (Intimate notes on travel experiences—one of the most famous books in English literature.) B–31 The Sign of the Four (Sherlock Holmes Story). Conan Doyle. B–35 A Study in Scarlet (Sherlock Holmes Story). Conan Doyle. FAMOUS PLAYS B–2 The Maid of Orleans: A Romantic Tragedy. Friedrich von Schiller. Adapted from the German by George Sylvester Viereck. B–9 Faust (Part I). Goethe. Translated by Anna Swanwick. Edited, with Introduction and Notes, by Margaret Munsterberg. B–10 Faust (Part II). Goethe. Translated by Anna Swanwick, etc. B–17 William Congreve’s Way of the World (A Comedy). With an essay by Macaulay, extracts from Lamb, Swift and Hazlitt, etc. Edited, with Introduction and Notes, by Lloyd E. Smith. B–26 Nathan the Wise (Famous Liberal Play). Gotthold Ephraim Lessing. Translated and Edited by Leo Markun. AUTOBIOGRAPHY AND BIOGRAPHY B–19 Persons and Personalities. Paragraphs and Essays. E. Haldeman- Julius. B–8 The Fun I Get Out of Life. E. Haldeman-Julius. B–13 John Brown: The Facts of His Life and Martyrdom. E. Haldeman- Julius. B–45 Confessions of a Young Man. George Moore.
  • 57. B–28 The Truth About Aimee Semple Mcherson. A Symposium. Louis Adamic, and Others. HALDEMAN-JULIUS PUBLICATIONS GIRARD, KANSAS PHILOSOPHY AND RELIGION B–4 The Wisdom of Life. Being the first of Arthur Schopenhauer’s Aphorismen zur Lebensweisheit. Translated with a Preface by T. Bailey Saunders. B–5 Counsels and Maxims. Being the second part of Arthur Schopenhauer’s Aphorismen zur Lebensweisheit. Translated by T. Bailey Saunders. B–1 On Liberty. John Stuart Mill. (Chapters include “Liberty of Thought and Discussion,” “Individuality,” “Limits to Authority of Society Over the Individual,” etc.) B–14 Evolution and Christianity. William M. Goldsmith. B–18 Resist Not Evil. Clarence Darrow. (Chapters include “Nature of the State,” “Armies and Navies,” “Crime and Punishment,” “Cause of Crime,” “Law and Conduct,” “Penal Codes and Their Victims,” etc.) FAMOUS TRIALS B–29 Clarence Darrow’s Two Great Trials (Reports of the Scopes Anti- Evolution Case and the Dr. Sweet Negro Trial). Marcet Haldeman-Julius.
  • 58. B–20 Clarence Darrow’s Plea in Defense of Loeb and Leopold (August 22, 23, 25, 1924). B–47 Trial of Rev. J. Frank Norris. Marcet Haldeman-Julius. CULTURE AND EDUCATION B–15 Culture and Its Modern Aspects. A Series of Essays. E. Haldeman- Julius. B–22 A Road-Map to Literature: Good Books to Read. Lawrence Campbell Lockley and Percy Hazen Houston. B–36 What is Wrong with Our Schools? A Symposium. Nelson Antrim Crawford, Charles Angoff, etc. B–34 Panorama: A Book of Critical, Sexual, and Esthetic Views. Dr. Isaac Goldberg. B–39 Snapshots of Modern Life. E. Haldeman-Julius. B–42 Sane and Sensible Views of Life. E. Haldeman-Julius. B–43 Clippings from an Editor’s Scrapbook. E. Haldeman-Julius. B–16 Iconoclastic Literary Reactions. E. Haldeman-Julius B–11 The Compleat Angler: Famous Book on a Beloved Sport. Izaak Walton (Patron Saint of Fishermen). B–44 Algebra Self Taught: With Problems and Answers. Lawrence A. Barrett. RATIONALISM AND DEBUNKING B–7 Studies In Rationalism. E. Haldeman-Julius. B–21 Confessions of a Debunker. E. Haldeman-Julius. B–23 The Bunk Box: A Collection of the Bits of Bunk That Infest American Life. E. Haldeman-Julius. B–25 An Agnostic Looks at Life: Challenges of a Militant Pen. E. Haldeman- Julius. B–37 Free Speech and Free Thought In America. E. Haldeman-Julius. B–38 Myths and Myth-Makers. E. Haldeman-Julius. B–40 This Tyranny of Bunk. E. Haldeman-Julius.
  • 59. JOSEPH McCABE’S SHAM-SMASHING BOOKS B–27 The Truth About the Catholic Church (Chapters include “The Papacy,” “Myth of Catholic Scholarship,” “Confessional,” “Catholic Services,” “Behind the Scenes with the Catholic Clergy,” etc.) B–48 Debunking the Lourdes “Miracles.” Also Includes “The Church In Mexico,” “The Cowardice of American Scientists,” “England’s Religious Census,” etc. COMPLETE SET OF 48 VOLUMES FOR ONLY $12.78: Get a good supply of excellent reading—invest in a complete set of 48 Big Blue Books, all now ready and in stock for immediate delivery. You can get all 48 volumes for only $12.78 prepaid. Use the blank below to order this set, or for your choice of any books at 30c each postpaid. Haldeman-Julius Publications, Girard, Kansas I enclose herewith $ ..... for ..... Big Blue Books at 30c each postpaid. I am putting a circle around the numbers of the books I want, below, corresponding to the numbers for the items in your list. B– 1 B– 2 B– 3 B– 4 B– 5 B– 6 B– 7 B– 8 B– 9 B– 10 B– 11 B– 12 B– 13 B– 14 B– 15 B– 16 B– 17 B– 18 B– 19 B– 20 B– 21 B– 22 B– 23 B– 24 B– 25 B– 26 B– 27 B– 28 B– 29 B– 30 B– 31 B– 32 B– 33 B– 34 B– 35 B– 36 B– 37 B– 38 B– 39 B– 40 B– 41 B– 42 B– 43 B– 44 B– 45 B– 46 B– 47 B– 48 If you want a Complete Set of 48 Volumes, remit $12.78 and check here .....
  • 61. A SANE SEX SERIES Authentic Information 50 Volumes A Leather Cover All for $2.98 re you ignorant of the facts of Life? Do you want authentic information about sex and love and their proper place in human affairs? Then these 50 volumes are what you have been waiting for. These books are helping thousands of people to understand themselves and others. Here are the facts, written by authorities—by psychologists, sociologists, physicians, and scientists. These books can be depended upon. There is nothing in these books to harm anyone, nothing to create any wrong ideas about life. The whole viewpoint is modern, sane, and healthful. These books foster a wholesome outlook on life, and at the same time give the facts everyone should know in a way which everyone can understand. Some of the eminent authorities who have prepared the text for these books are Havelock Ellis, the famous English expert on sexual psychology; James Oppenheim, a N.Y. practicing psycho-analyst; William J. Fielding, well-known for his recent book, “Sex and the Love-Life”; Dr. Morris Fishbein of the American Medical Association; Dr. Joseph H. Greer; Dr. Wilfrid Lay; Dr. Charles Reed; Professor C. L. Fenton, etc. Do not hesitate to rely upon these books; they are thoroughly up to date, containing the latest facts available. 50 Volumes-–750,000 Words
  • 62. Each of these books contains about 15,000 words of text, making 750,000 words in all. The books are of a convenient size (3½ × 5 inches) to fit the pocket, average 64 pages each, have easily readable type, and are bound in substantial stiff card covers. If these books were issued in ordinary library form they would cost from $25 to $30 for the set. But in this neat pocket-sized edition, due to mass production, they are offered for only $2.98, full and final payment for the entire 50 volumes and a leather cover. A Real Leather Cover Included with each set of 50 volumes, at no extra cost, is a genuine leather slip cover, made from high grade black levant leather. This cover holds one book at a time, protecting it while in use; a book may be slipped in or out in a few seconds. This cover has the added advantage that it can be slipped on a book to carry in the pocket, thus concealing the cover and title if anyone prefers to avoid possible embarrassment. Not only this, but you can enjoy the luxurious “feel” of real leather while reading these books. And remember—$2.98 is positively all you pay for 50 books and this leather cover. 50 BOOKS Sane Sex Facts for Everyone Facts for Girls Facts for Boys Facts for Young Men Facts for Young Women For Married Men For Married Women Manhood Facts Womanhood Facts For Women Past 40
  • 63. For Expectant Mothers Woman’s Sex-Life Man’s Sex-Life The Child’s Sex-Life Homosexual Life Evolution of Sex Physiology of Sex Sex Common Sense Determination of Sex Sex Symbolism Sex in Psychoanalysis Sleep and Sex Dreams Chats with Wives Chats with Husbands Talks with the Married How to Love Art of Kissing How to Win a Mate Beginning Marriage Right Happiness in Marriage Sex Ethics Modern Sex Morality Love Letters Psychology of Affections Birth Control Immoral? Birth Control Today Women’s Love Rights Sex Today (.it Ellis) Ellis and Sex Sanity Eugenics Explained Genetics Made Plain Heredity Made Plain Venereal Diseases Syphilis Facts Sex and Crime America’s Sex Impulse
  • 64. Sex in Religion What Is Love? Story of Marriage Sex Rejuvenation Companionate Marriage SEND NO MONEY For this Sane Sex Series of 50 volumes and a leather cover you need not remit in advance unless you wish. You can pay the postman only $2.98 on delivery. This set is shipped in plain wrapper. Use the blank at the right, or just ask for “Sane Sex Series.” No C. O. D. orders can be sent to Canada or foreign countries; these must remit in advance by international postal money order or draft on any U. S. bank. SIGN AND MAIL THIS BLANK Haldeman-Julius Publications, Girard, Kansas Send me the 50–volume SANE SEX SERIES and 1 Leather Cover, in plain wrapper. Unless my check is enclosed herewith, I will pay the postman $2.98 on arrival. It is understood that $2.98 is all I pay and that I am under no further obligation whatever. Name ................................................ Address .............................................
  • 66. THE MODERN LIBRARY 88 CENTS PER COPY PREPAID Your Choice OSCAR WILDE Salome, Importance of Being Earnest, Lady Windermere’s Fan.
  • 67. Ideal Husband and A Woman of No Importance. De Profundis (Out of the Depths). Dorian Gray (Novel). Poems (Harlot’s House, Sphinx, Reading Gaol, etc.) Fairy Tales and Poems in Prose. Pen, Pencil and Poison. ANATOLE FRANCE Crime of Sylvestre Bonnard. Queen Pedauque. Red Lily. Thais. GABRIELE D’ANNUNZIO Flame of Life. Child of Pleasure. Maidens of the Rocks. Triumph of Death. THOMAS HARDY Jude the Obscure. Major of Casterbridge. Return of the Native. FRIEDRICH NIETZSCHE
  • 68. Thus Spake Zarathustra. Beyond Good and Evil. Genealogy of Morals. Ecce Homo and The Birth of Tragedy. HENRIK IBSEN Doll’s House, Ghosts, and An Enemy of the People. Hedda Gabler, Pillars of Society and The Master Builder. Wild Duck, Rosmersholm and The League of Youth. GUY DE MAUPASSANT Love and Other Stories (For Sale, Clochette, His Wedding Night, Moonlight, etc.) Mademoiselle Fifi and Other Tales (Piece of String, Tallow Ball, Useless Beauty, The Horla, A Farm Girl, etc.). Une Vie (Story of a Woman’s Heart). SHERWOOD ANDERSON Poor White (A Novel). Winesburg, Ohio (Short Stories). SAMUEL BUTLER Erewhon, or Over the Range. Way of All Flesh.
  • 69. JAMES BRANCH CABELL Beyond Life. Cream of the Jest. NORMAN DOUGLAS South Wind (A Novel). Old Calabria. LORD DUNSANY Dreamer’s Tales. Book of Wonder. GUSTAVE FLAUBERT Madame Bovary. Temptation of St. Anthony. W. S. GILBERT Mikado, Iolanthe, Pirates of Penzance, and The Gondoliers. H. M. S. Pinafore, Patience, Yeomen of the Guard and Ruddigore. GEORGE GISSING New Grub Street. Private Papers of Henry Ryecroft.
  • 70. REMY DE GOURMONT Night in the Luxembourg. Virgin Heart (Translated by Aldous Huxley). W. H. HUDSON Green Mansions. Purple Land. D. H. LAWRENCE Rainbow. Sons and Lovers. GEORGE MEREDITH Diana of the Crossways. Ordeal of Richard Feverel. WALTER PATER Renaissance. Marius the Epicurean. ARTHUR SCHNITZLER Anatol, Green Cockatoo, and Living Hours. Bertha Garlan.
  • 71. AUGUST STRINDBERG Married. Miss Julie, The Creditor, The Stronger Woman, Motherly Love, Paria and Simoon. LEO TOLSTOY Redemption, Power of Darkness and Fruits of Culture. Death of Ivan Ilyitch, Polikushka, Two Hussars, Snowstorm, and Three Deaths. IVAN TURGENEV Fathers and Sons. Smoke. MISCELLANEOUS Modern American Poetry. Ed. Conrad Aiken. Seven That Were Hanged and the Red Laugh. Leonid Andreyev. Short Stories by Honore de Balzac (Don Juan, Christ in Flanders, Time of the Terror, Passion in the Desert, Accursed House, Atheist’s Mass, etc.). Prose and Poetry. Baudelaire. Art of Aubrey Beardsley (64 Reproductions). Art of Rodin (64 Reproductions). Jungle Peace. William Beebe. Zuleika Dobson. Max Beerbohm.
  • 72. In the Midst of Life (Stories). Ambrose Bierce. Poems of William Blake. Wuthering Heights. Emily Bronte. House With the Green Shutters. George Douglas Brown. Love’s Coming of Age. Edward Carpenter. Alice in Wonderland, Through the Looking-Glass and Hunting of the Snark. Lewis Carroll. Autobiography of Benvenuto Cellini. Rothschild’s Fiddle. Anton Chekhov. Man Who Was Thursday. G. K. Chesterton. Men, Women and Boats. Stephen Crane. Sapho. Alphonse Daudet. Also contains Manon Lescaut (When a Man Loves) by Antoine Prevost. Moll Flanders. Daniel Defoe. Poor People. Feodor Dostoyevsky. Poems and Prose. Ernest Dowson. Free and Other Stories. Theodore Dreiser. Camille. Alexandre Dumas. New Spirit, The. Havelock Ellis. Life of the Caterpillar. Jean Henri Fabre. Jorn Uhl. Gustav Frenssen. Mlle. de Maupin. Theophile Gautier. Bed of Roses. W. L. George. Renee Mauperin. E. and J. de Goncourt. Creatures That Once Were Men and Other Stories. Maxim Gorki.
  • 73. Scarlet Letter. Nathaniel Hawthorne. Some Chinese Ghosts. Lafcadio Hearn. Erik Dorn. Ben Hecht. Daisy Miller and An International Episode. Henry James. Philosophy of William James. Dubliners. James Joyce. Soldiers Three. Rudyard Kipling. Men in War. Andreas Latzko. Upstream. Ludwig Lewisohn. Mme. Chrysantheme. Pierre Loti. Spirit of American Literature. John Macy. Miracle of St. Anthony, Pelleas and Melisande, and Four Other Plays. Maurice Maeterlinck. Moby Dick, or The Whale. Herman Melville. Romance of Leonardo da Vinci. Dmitri Merejkowski. Plays by Moliere (Highbrow Ladies, School for Wives, Tartuffe, Misanthrope, etc.) Confessions of a Young Man. George Moore. Tales of Mean Streets. Arthur Morrison. Moon of the Caribbees and Other Plays (Bound East for Cardiff, In the Zone, Ile, etc.). Eugene O’Neill. Writings of Thomas Paine. Pepys’ Diary. Best Tales of Poe. Life of Jesus. Ernest Renan. Selected Papers of Bertrand Russell.
  • 74. Imperial Orgy. Edgar Saltus. Studies in Pessimism. Arthur Schopenhauer. Story of an African Farm. Olive Schreiner. Unsocial Socialist. George Bernard Shaw. Philosophy of Spinoza. Treasure Island. Robert Louis Stevenson. Ego and His Own. Max Stirner. Dame Care. Hermann Sudermann. Poems of Algernon Charles Swinburne. Complete Poems of Francis Thompson. Ancient Man. Hendrik Willem van Loon. Poems of Francois Villon. Candide. Voltaire. Ann Veronica. H. G. Wells. Poems of Walt Whitman. Selected Addresses and Papers of Woodrow Wilson. Irish Fairy and Folk Tales. William Butler Yeats. Nana. Emile Zola. COLLECTIONS—SYMPOSIUMS A Modern Book of Criticisms: Edited by Ludwig Lewisohn, with contributions by G. B. Shaw, Anatole France, Remy de Gourmont, Geo. Moore, etc. The Woman Question: Westermarck’s Subjection of Wives, Ellen Key’s Right of Motherhood, Carpenter’s Woman in Freedom, Maeterlinck’s On Women, Havelock Ellis’ Changing Status of Women, etc.