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. Revolution R Enterprise: Production-Grade Analysis for Business & Large-Scale Research. Industry’s Most Capable Big Data Big Analytics Platform Revolution R Enterprise is the fastest, most cost effective enterprise-class big data big analytics platform available today.

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.

This is especially true when the time series need to be extracted from time stamped data embedded in very large data sets: data sets that are too large to be read into memory. In this example, we are going to use “data step” functions in Revolution Analytics’ RevoScaleR package to access a large data file, manipulate it, sort it, extract the data we need and aggregate records with monthly time stamps to form multiple, monthly time series.

Getting Started Summary. 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 By RevoJoe.

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. 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. 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. 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" ? ><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> We might want to turn this into a data frame in R with a row for each student and four variables, the name and the scores on the three tests.

Since this is a small file, let's not worry about efficiency in any way. Doc = xmlRoot(xmlTreeParse("generic_file.xml")) We use xmlRoot() to get the top-level node of the tree rather than holding onto the general document information since we won't need it. function(node) xmlSApply(node, xmlValue) 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. 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) Grabbing Tables in Webpages Using the XML Package. R preferred by Kaggle competitors. The R Project for Statistical Computing. CRAN: Manuals. Edited by the R Development Core Team. The following manuals for R were created on Debian Linux and may differ from the manuals for Mac or Windows on platform-specific pages, but most parts will be identical for all platforms. The correct version of the manuals for each platform are part of the respective R installations.

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. Extension packages in this area are highly recommended to interface with tm's basic routines and useRs are cordially invited to join in the discussion on further developments of this framework package.

To get into natural language processing, the cRunch service and tutorials may be helpful. R-Forge: RGoogleData: Project Home. R Data Import/Export. Table of Contents. R: Data Output. Description write.table prints its required argument x (after converting it to a data frame if it is not one nor a matrix) to a file or connection. Usage write.table(x, file = "", append = FALSE, quote = TRUE, sep = " ", eol = "\n", na = "NA", dec = " How to Learn R. 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 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 .

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. 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.