Chapter 15 Storage Wars
Before now we have only used small amount of data that we typed in ourselves, or somewhat larger amounts that we extracted from Twitter. The world is full of other sources of data, however, and we need to examine how to get them into R, or at least how to make them accessible for manipulation in R. In this chapter, we examine various ways that data are stored, and how to access them.
Sources.
R Functions Used in this Chapter
-
as.numeric()- Convert another data type to a number -
dbConnect()- Connect to an SQL database -
dgGetQuery()- Run an SQL query and return the results -
dbListTables()- Show the tables available in a connection -
dbWriteTable()- Send a data table to an SQL systems -
install.packages()- Get the code for an R package -
lapply()- Apply a function to elements of a list -
library()- Make an R package available for use -
Numberize()- A custom function created in this chapter -
read.xls()- Import data from a binary R file; part of the gdata package -
return()- Used in functions to designate the data returned by the function -
str_replace()- Replace a character string with another -
str_replace_all()- Replace multiple instances of a character string with another
