WebScraping with R
R Data Import/Export This is a guide to importing and exporting data to and from R. The current version of this document is 2.15.3 (2013-03-01). Copyright © 2000–2012 R Core Team Permission is granted to make and distribute verbatim copies of this manual provided the copyright notice and this permission notice are preserved on all copies.
R Installation and Administration This is a guide to installation and administration for R. The current version of this document is 2.15.3 (2013-03-01). Copyright © 2001–2012 R Core Team Permission is granted to make and distribute verbatim copies of this manual provided the copyright notice and this permission notice are preserved on all copies. Permission is granted to copy and distribute modified versions of this manual under the conditions for verbatim copying, provided that the entire resulting derived work is distributed under the terms of a permission notice identical to this one.
Section: About R_note About the readers Who are interesting in this note? Where are they from? A record from google analytics shows the possible visits.
Introduction Analyzing time series data of all sorts is a fundamental business analytics task to which the R language is beautifully suited. In addition to the time series functions built into base stats library there are dozens of R packages devoted to time series http://crantastic.org/task_views/TimeSeries . Some packages help with basic tasks such as creating date data types, others offer specialized functions for financial applications.
What I would like is a nice list of all of credible sources on the Internet for finding data to use with R projects. I know that this is a crazy idea, not well formulated (what are data after all) and loaded with absurd computational and theoretical challenges. (Why can't I just google "data R" and get what I want?) So, what can I do? As many people are also out there doing, I can begin to make lists (in many cases lists of lists) on a platform that is stable enough to survive and grow, and perhaps encourage others to help with the effort.
Airlines, Consumers, and Twitter Anyone who travels regularly recognizes that airlines struggle to deliver a consistent, positive customer experience. Through extensive interview and survey work, the American Customer Satisfaction Index ( http://theacsi.org/ ) quantifies this impression. As a group, airlines falls at the bottom of their industry rankings, below the Post Office and insurance companies: Meanwhile, the immediacy and accessibility of Twitter provides a real-time glimpse into consumer's frustration: This tutorial demonstrates how to use R to collect tweets and apply a (very) naive algorithm to estimate their emotional sentiment.
Description Functions to create, open and close connections. Usage
Description These functions provide the base mechanisms for defining new functions in the R language. Usage function( arglist ) expr return(value)
Description This function creates data frames, tightly coupled collections of variables which share many of the properties of matrices and of lists, used as the fundamental data structure by most of R 's modeling software. Usage
Latest version: XML_1.6-3.tar.gz R Package Support for S4/Splus5 for the Tree Parsing Event driven parsing and function callbacks not yet added for S4/Splus5.
Abstract The idea here is to provide simple examples of how to get started with processing XML in R using some reasonably straightforward "flat" XML files and not worrying about efficiency. Here is an example of a simple file in XML containing grades for students for three different tests. <?xml version="1.0" ?><TABLE><GRADES><STUDENT> Fred </STUDENT><TEST1> 66 </TEST1><TEST2> 80 </TEST2><FINAL> 70 </FINAL></GRADES><GRADES><STUDENT> Wilma </STUDENT><TEST1> 97 </TEST1><TEST2> 91 </TEST2><FINAL> 98 </FINAL></GRADES></TABLE>
To parse an XML document, you can use xmlInternalTreeParse() or xmlTreeParse() (with useInternalNodes specified as TRUE or FALSE ) or xmlEventParse() . If you are dealing with HTML content which is frequently malformed (i.e. nodes not terminated, attributes not quoted, etc.), you can use htmlTreeParse() . You can give these functions the name of a file, a URL (HTTP or FTP) or XML text that you have previously created or read from a file. If you are working with small to moderately sized XML files, it is easiest to use xmlInternalTreeParse() to first read the XML tree into memory.
Re: [R] Need help extracting info from XML file using XML package from Duncan Temple Lang on 2009-03-03 (R help archive)Wacek Kusnierczyk wrote: > Don MacQueen wrote: >> I have an XML file that has within it the coordinates of some polygons >> that I would like to extract and use in R. The polygons are nested >> rather deeply.
> if (! require (XML)) install.packages ( 'XML' ) > library (XML) > str (x, max.level = 1) List of 18