R Markdown

This is an R Markdown document. Markdown is a simple formatting syntax for authoring HTML, PDF, and MS Word documents. For more details on using R Markdown see http://rmarkdown.rstudio.com.

When you click the Knit button a document will be generated that includes both content as well as the output of any embedded R code chunks within the document. You can embed an R code chunk like this:

library(tidyverse)
## -- Attaching packages --------------------------------------- tidyverse 1.3.1 --
## v ggplot2 3.3.5     v purrr   0.3.4
## v tibble  3.1.4     v dplyr   1.0.7
## v tidyr   1.1.3     v stringr 1.4.0
## v readr   2.0.1     v forcats 0.5.1
## -- Conflicts ------------------------------------------ tidyverse_conflicts() --
## x dplyr::filter() masks stats::filter()
## x dplyr::lag()    masks stats::lag()
library(XML)
library(jsonlite)
## 
## Attaching package: 'jsonlite'
## The following object is masked from 'package:purrr':
## 
##     flatten
library(methods)
library(dplyr)
library(httr)
library(DT)
html_file = GET("https://raw.githubusercontent.com/mianshariq/SPS/main/Data%20607/Assignments/Week%207%20Assignment/booklist.html", ,config(sslversion=6,ssl_verifypeer=1))

 booksHTML <- htmlParse(file = "booklist.html")
 booksHTML <- readHTMLTable(booksHTML, stringAsFactors=FALSE)
 booksHTML <- booksHTML[[1]]
 datatable(booksHTML)
xml_file <- GET("https://raw.githubusercontent.com/mianshariq/SPS/main/Data%20607/Assignments/Week%207%20Assignment/booklists.xml", config(sslversion=6,ssl_verifypeer=1))
xml_file
## Response [https://raw.githubusercontent.com/mianshariq/SPS/main/Data%20607/Assignments/Week%207%20Assignment/booklists.xml]
##   Date: 2021-10-11 01:46
##   Status: 200
##   Content-Type: text/plain; charset=utf-8
##   Size: 8.58 kB
## NA
json_file <- GET("https://github.com/mianshariq/SPS/raw/df58e815f1ddf9f2b951d3e60c82106262828a14/Data%20607/Assignments/Week%207%20Assignment/booklist.json")

Including Plots

You can also embed plots, for example:

Note that the echo = FALSE parameter was added to the code chunk to prevent printing of the R code that generated the plot.