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.
XML in R
From the course: R Programming in Data Science: High Variety Data
XML in R
- [Instructor] XML in R could be a course all by itself. There's a tremendous amount of data stored in xml and there's a lot of ways to work with it in R, but for this video, we're going to restrict ourselves just to the import and export of xml. When you work with xml in R, Use the xml2 package, and you'll need to install it, just like I've shown here. Hit command return to run the install package, and that will bring the xml2 package into your base version of R. Use a library xml2 command to make that available to you and now you have xml commands available for use with import and export. The xml2 package includes several example xml files and we'll use one of them for our import and export work. So I've created XML sample file, a vector, and I'm going to bring in cd_catalog_xml. Now I'm ready to import xml into R, and to do that I'll use the read xml command, I'm going to bring that into xml in R, that's just a standard vector, and I'm going to place on that the results of read_xml…
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.