background preloader

R codelines

Facebook Twitter

CRAN - Package SortableHTMLTables. Statistics, R, Graphics and Fun. WebScraping with R. Questions containing '[r] xml xpath' Semin-r. R Data Import/Export. Table of Contents This is a guide to importing and exporting data to and from R.

R Data Import/Export

This manual is for R, version 3.1.0 (2014-04-10). Copyright © 2000–2013 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. Acknowledgements The relational databases part of this manual is based in part on an earlier manual by Douglas Bates and Saikat DebRoy. Many volunteers have contributed to the packages used here.

Brian Ripley is the author of the support for connections. 1 Introduction This manual describes the import and export facilities available either in R itself or via packages which are available from CRAN or elsewhere. 1.1 Imports. R Installation and Administration. Table of Contents This is a guide to installation and administration for R.

R Installation and Administration

This manual is for R, version 3.1.0 (2014-04-10). Copyright © 2001–2013 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.

The Exploration of Statistical Software R ( έp n R ` ׾ I) Section: About R_note About the readers Who are interesting in this note?

The Exploration of Statistical Software R ( έp n R ` ׾ I)

Where are they from? A record from google analytics shows the possible visits. 29,145 visits came from 5,195 cities and 144 countries (Jun 19, 2007 to Jun 19, 2011.) This site is maintained by the Department of Mathematics, National Central University, Taiwan. Revolution R Enterprise: Production-Grade Analysis for Business & Large-Scale Research.

Industry’s Most Capable Big Data Big Analytics Platform.

Revolution R Enterprise: Production-Grade Analysis for Business & Large-Scale Research

CRAN Task Views. It's crantastic! Extracting Time Series from Large Data Sets. Introduction Analyzing time series data of all sorts is a fundamental business analytics task to which the R language is beautifully suited.

Extracting Time Series from Large Data Sets

In addition to the time series functions built into base stats library there are dozens of R packages devoted to time series Some packages help with basic tasks such as creating date data types, others offer specialized functions for financial applications. When working with R the difficult part isn’t finding the right analytical tool; often, it’s getting the time series data to begin with. Finding Data on the Internet.

Skip to Content A Community Site for R – Sponsored by Revolution Analytics Home » How to » Finding Data on the Internet.

Finding Data on the Internet

Mining Twitter for Airline Consumer Sentiment. Airlines, Consumers, and Twitter Anyone who travels regularly recognizes that airlines struggle to deliver a consistent, positive customer experience.

Mining Twitter for Airline Consumer Sentiment

Through extensive interview and survey work, the American Customer Satisfaction Index ( 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. This tutorial was originally presented as a first-time introduction to R for the savvy audience of the Boston Predictive Analytics Meetup Group.

Connections {base} Description Functions to create, open and close connections.

connections {base}

Usage Arguments. Function {base} Description These functions provide the base mechanisms for defining new functions in the R language.

function {base}

Usage. Data.frame {base} 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.

data.frame {base}

Usage data.frame(..., row.names = NULL, check.rows = FALSE, check.names = TRUE, stringsAsFactors = default.stringsAsFactors()) default.stringsAsFactors() Arguments these arguments are of either the form value or tag = value. Xml - Web scraping with R over real estate ads. Untitled. R & SPlus XML Parsers. 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. Requires mutable state and hence integration of the CORBA/Java/XML driver interface for this kind of thing. Fix of some trivial bugs. Overview XML is one of several facilities we are investigating for enhancing communication between applications. Untitled. 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" ? A Short Introduction to the XML package for R. 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. #" doc = xmlInternalTreeParse("Install/Web/index.html.in") Then you can traverse the tree looking for the information you want and putting it into different forms.

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. For example, I found by trial and error that I can >> extract the coordinates of one of them using functions from the XML >> package: >> >> doc <- xmlInternalTreeParse('doc.kml') >> docroot <- xmlRoot(doc) >> pgon <- > > try > > lapply( > xpathSApply(doc, '//Polygon', > xpathSApply, '//coordinates', function(node) > strsplit(xmlValue(node), split=',|\\s+')), > as.numeric) Just for the record, I the xpath expression in the second xpathSApply would need to be ".

Grabbing Tables in Webpages Using the XML Package. > if (! Require(XML)) install.packages('XML') > library(XML) > str(x, max.level = 1) List of 18 $ NULL:'data.frame': 1 obs. of 1 variable: $ NULL:'data.frame': 52 obs. of 12 variables: R preferred by Kaggle competitors. Kaggle, the predictive-analytics competition site, has analyzed the preferences of the 2,500 data scientists who participate in its competitions, and R was the most-preferred software of the competitors at 22.5%. The next-nearest alternative was Matlab, at 16%. On a related note, the premier of the Australian state of New South Wales has just launched a competition on Kaggle to predict the traffic on Sydney's M4 motorway. The R Project for Statistical Computing. CRAN: Manuals. Edited by the R Development Core Team. Natural Language Processing.

Natural language processing has come a long way since its foundations were laid in the 1940s and 50s (for an introduction see, e.g., Jurafsky and Martin (2008): Speech and Language Processing, Pearson Prentice Hall). This CRAN task view collects relevant R packages that support computational linguists in conducting analysis of speech and language on a variety of levels - setting focus on words, syntax, semantics, and pragmatics. In recent years, we have elaborated a framework to be used in packages dealing with the processing of written material: the package tm. R-Forge: RGoogleData: Project Home. R Data Import/Export. Table of Contents This is a guide to importing and exporting data to and from R. R: Data Output. How to Learn R. The R programming language was designed for doing statistics. In my view, its great popularity among statisticians, people learning statistics, data miners and others is due to the way it facilities the process of thinking about statistics.

Mailing List Archive. Romain Francois, Professional R Enthusiast. Untitled. Untitled. R - How to transform XML data into a data.frame. Sorenmacbeth/googleanalytics4r. R] Downloading data from from internet. Tuto : Extraire des données d'une page web avec R - 3 - Données sur plusieurs pages. Tuto : Extraire des données d'une page web avec R - 2 - Données structurées. Tuto : Extraire des données d'une page web avec R - 1 - Les tableaux. [BioC] PostForm() with KEGG. R/htmlToText/htmlToText.R at master from tonybreyal/Blog-Reference-Functions - GitHub. R bloggers. Untitled. Extracting comments from a Blogger.com blog post with R. Note #1: Check out this very useful post by Najko Jahn describing how to extract links to blogs via Google Blog Search .

Note #2: I’ll update the code below once I find the time using Najko’s cleaner XPath-based solution. Recently I’ve been working with comments as part of the project on science blogging we’re doing at the Junior Researchers Group “Science and the Internet” . I wrote the script below to quickly extract comments from Atom feeds, such as those generated by Blogger.com . The code isn’t exactly pretty, mostly because I didn’t use an XML parser to properly read the data, instead resorting to brute-force pattern matching, but it gets the job done.

Web scraping. Web scraping You are encouraged to solve this task according to the task description, using any language you may know. Create a program that downloads the time from this URL: and then prints the current UTC time by extracting just the UTC time from the web page's HTML. If possible, only use libraries that come at no extra monetary cost with the programming language and that are widely available and popular such as CPAN for Perl or Boost for C++. Syntaxe de base. / Le langage. / Aide mémoire R. Lecture et Ecriture de fichiers. / Le langage. / Aide mémoire R. Système et fichiers. / Le langage. / Aide mémoire R. Chaînes de caractères. / Le langage. / Aide mémoire R. Numeric {base} Grep {base} The R Journal >> Current Issue. CRAN Packages By Date. Executer un programme R avec PHP. Algèbre linéaire. French users of R in social sciences.

R for Windows FAQ. Input and Output. Package ff. Untitled. Automating R script with Windows 7. R_allocstringbuffer. R commands. One R Tip a Day (rlangtip) sur Twitter. Groupe des utilisateurs du logiciel R. Apache CouchDB: The Apache CouchDB Project. CouchDB and R. Geting started with CouchDB. Tips:programming:code_optim2. cURL - How To Use. Example .  An example of nested downloads using RCurl. RCurl. MCMC programming in R, Python, Java and C « Darren Wilkinson's research blog. Thinking inside the box. Integrating R with C++: Rcpp, RInside, and RProtobuf. Rcpp: Seamless R and C++ Integration. How to incorporate C or C++ code into my R code to speed up a MCMC program, using a Metropolis-Hastings algorithm.

Installing Rcpp on Windows 7 for R and C++ integration « Consistently Infrequent. R « Consistently Infrequent. Visualize your Facebook friends network with R. Great Maps with ggplot2. ACM San Francisco Bay Area Professional Chapter. Machine Learning for Hackers. Creating beautiful maps with R. Snow Simplified: a user guide to the snow R package. Technical Notes on the R programming language. Welcome to a Little Book of R for Time Series! — Time Series 0.1 documentation.

Introduction to Statistical Thinking (With R, Without Calculus) Statistics with R. D G Rossiter - Publications & Computer Programs. Another aspect of speeding up loops in R. How to speed up loops in R. Making Data Work: Strata 2012 - O'Reilly Conferences, February 28 - March 01, 2012. Revolution Analytics - Commercial Software & Support for the R Statistics Language. Home · RevolutionAnalytics/RHadoop Wiki.