

Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
This page cannot be seen from the preview
Don't miss anything!


(a) RSS is a format that is used to provide information about news stories, blog entries, or any other information that can be broken down into individual items. When you see a symbol like this or this on a web page, it indicates a link to an RSS feed. Write a function, which accepts the URL of an RSS feed, and returns a data frame with the headlines (titles) and description of the objects in the feed. You can use the RSS feed of Yahoo headlines available at http://rss.news.yahoo.com/rss/topstories to develop your function. Then find at least two other RSS feeds, preferably at a site you’re interested in, and use your function on them. (If you’d like help finding an RSS feed, go to http://www.syndic8.com, where you can find the URLs of over 400,000 RSS feeds along with a search engine.) (b) At http://www.stat.berkeley.edu/classes/s133/listings.xml.gz, there is a gzipped file containing five days of television listings for over 200 channels. This XML file has two separate trees - one which describes the channels and the other which describes the programs. You’ll need to use xmlElementsByTagName to separate them before processing. From these TV listings, use the XML library in R to create a data frame with columns for starting time, channel, title and description of each of the programs represented in the listings. Notice that some of this information is stored as attributes in the XML tags, so you’ll need to use xmlAttrs to extract this infor- mation. Once you’ve got the data frame set up, choose a show or topic that you’re inter- ested in, and use R to print the rows of the data frame corresponding to those programs that match your criteria.
For each of the three methods, calculate the percent of observations that were mis- classified in order to determine which method was most effective in classifying the observations. Note: If there is some other data set that you are interested that is appropriate for classification analysis, you can substitute that for the iris data set.
Your submission should be contained in a single pdf file, containing all the R code you used for the assignment. Email this file to me ([email protected]), with your name and stat user account in the subject of the email message and on the report, by 11:59PM (plus or minus a minute) on the due date. Make certain to save a copy of your email submission.