Code from XML and Web Technologies for Data Sciences with R

Please note that not all of the supporting data files are currently available via the Web site. Please, contact us if you need specific ones.

Any of the code can be extracted directly from the XML version of the book content (compressed). You can use XPath queries to access just the code you want, or any of the text, examples, figures, tables, etc. You can use this as a sample document. Similarly, you can use the functions xmlSource() and xmlSourceFunctions() to evaluate collections of code, e.g. a section, an example, a particular node.

You can use the CodeDepends package to run the code up to the point to create a particular variable.

To retrieve all the code in a particular (sub)section, you can use the fact that each section has a sectionID attribute given in the form chapterNumber.sectionNumber.sectionNumber....sectionNumber. For example, we can access section 8.3.2 in chapter 12 with

doc = xmlParse("")
runSectionID("", doc)

Code from Examples

The code from each example is available hierarchically by chapter.

Code from each Chapter

The code from each chapter chapter.


Much of the code refers to URLs. However, some local files are used. You can find (most of) these in the Data directory.
Duncan Temple Lang <>
Last modified: Mon Jan 6 16:21:46 PST 2014