library(XML)
library(RCurl)
## Loading required package: bitops
library(rjson)
library(RJSONIO)
## 
## Attaching package: 'RJSONIO'
## 
## The following objects are masked from 'package:rjson':
## 
##     fromJSON, toJSON
library(jsonlite)
## 
## Attaching package: 'jsonlite'
## 
## The following objects are masked from 'package:RJSONIO':
## 
##     fromJSON, toJSON
## 
## The following objects are masked from 'package:rjson':
## 
##     fromJSON, toJSON
## 
## The following object is masked from 'package:utils':
## 
##     View

Processing the HTML file

#File location
url4html <-"https://raw.githubusercontent.com/fangseup88/Assignment_Week7/master/books.html"

#Getting the data file
file4html <- getURL(url4html)

#Create dataframe 
df4html <-  data.frame(readHTMLTable(file4html))

Processing XML file

url4xml <-"https://raw.githubusercontent.com/fangseup88/Assignment_Week7/master/books.xml"
#Getting the data file
file4xml <- getURL(url4xml)
#Create dataframe 
intermxml <- xmlTreeParse(file4xml)
df4xml<-data.frame(xmlToList(intermxml, addAttributes=FALSE))

Processing JSON file

#Location of the file
url4json <-"https://raw.githubusercontent.com/fangseup88/Assignment_Week7/master/books.json"
#Getting the data file
file4json <- getURL(url4json)
#Create dataframe 
df4json <- data.frame(fromJSON(file4json))

Conclusion

All the data frames contain the informations displayed in the initial files. It is showing that the data frames for HTML and JSON have the same structure. In those datafiles, the informations about the books are mixed together. The data frame for XML is different, it follows the input file structure.