From the course: R Programming in Data Science: High Variety Data
Unlock the full course today
Join today to access over 22,600 courses taught by industry experts or purchase this course individually.
HTML files in R
From the course: R Programming in Data Science: High Variety Data
HTML files in R
- [Instructor] Importing data stored as HTML into R is more problematic than you might think. It's easy enough to get the data into R, once it's in R, working with it is a little bit more confusing, let's take a look. By the way, if you're looking at writing HTML, there are several other packages that will allow you to write a data frame out to HTML, including htmltidy, scrapR, and shiny. CRAN has an entire task list that will include all of the HTML packages that are available to you in R. For now, let's focus on importing an HTML file, and to do that, you'll need to make sure to install the xml2 package, if you haven't done so already, and then use the library command to make it available to you. Now, I've selected a very long URL, it's at NASA. Let's take a quick look at that. This is the NASA Near Earth Object database, and it contains lots of information about objects orbiting Earth, and it includes a nice table that we would really like to analyze inside of R. So let's bring…
Practice while you learn with exercise files
Download the files the instructor uses to teach the course. Follow along and learn by watching, listening and practicing.