APPENDIX A USING DATAMARKET

A.1 OVERVIEW

DataMarket provides a library and package that they have created for exporting data into the R environment. In order to use this package with the library, the user needs to put the following commands into R at the beginning of a session:

install.packages(“rdatamarket”)
library(rdatamarket)

The above code will download the “rdatamarket” package and library. It requires about 3.6 megabytes. When the user runs the above code in the R environment, the prompt as shown in Figure A.1 will appear. If the user presses cancel (after the commands cited above), the R code will try to perform the task without the latest updates.

images

FIGURE A.1 The CRAN prompt.

A full list of the commands and functions that the “rdatamarket” package adds can be found at http://cran.r-project.org/web/packages/rdatamarket/rdatamarket.pdf

This code is necessary if the user desires to export data from DataMarket to R.

CRAN stands for Comprehensive R Archive Network. A CRAN mirror a site that contains the latest updates, versions, etc., of R.

If the user desires to select a CRAN mirror, it is advised that a nearby location be selected. For additional information regarding CRAN the user should visit http://cran.r-project.org/doc/FAQ/R-FAQ.html#What-is-CRAN_003f. This can be found in the Frequently Asked Questions tab in the R-project website which can be found at http://www.r-project.org/ ...

Get Basic Data Analysis for Time Series with R now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.