<?xml version="1.0" encoding="UTF-8"?>
 <rdf:RDF xmlns="http://purl.org/rss/1.0/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:cc="http://web.resource.org/cc/" xmlns:syn="http://purl.org/rss/1.0/modules/syndication/" xmlns:admin="http://webns.net/mvcb/">
  <channel rdf:about="http://pinboard.in">
    <title>Pinboard (rahuldave)</title>
    <link>https://pinboard.in/u:rahuldave/public/</link>
    <description>recent bookmarks from rahuldave</description>
    <items>
      <rdf:Seq>	<rdf:li rdf:resource="http://www.r-bloggers.com/r-tutorial-series-centering-variables-and-generating-z-scores-with-the-scale-function/"/>
	<rdf:li rdf:resource="http://code.google.com/edu/languages/google-python-class/introduction.html"/>
	<rdf:li rdf:resource="http://feeds.arstechnica.com/~r/arstechnica/index/~3/tGM5tqWsxfY/tutorial-use-twitters-new-real-time-stream-api-in-python.ars"/>
      </rdf:Seq>
    </items>
  </channel><item rdf:about="http://www.r-bloggers.com/r-tutorial-series-centering-variables-and-generating-z-scores-with-the-scale-function/">
    <title>R Tutorial Series: Centering Variables and Generating Z-Scores with the Scale() Function</title>
    <dc:date>2012-03-01T14:00:00+00:00</dc:date>
    <link>http://www.r-bloggers.com/r-tutorial-series-centering-variables-and-generating-z-scores-with-the-scale-function/</link>
    <dc:creator>rahuldave</dc:creator><description><![CDATA[
(This article was first published on   R Tutorial Series, and kindly contributed to R-bloggers)      


Centering variables and creating z-scores are two common data analysis activities. While they are relatively simple to calculate by hand, R makes these operations extremely easy thanks to the scale() function.
Tutorial FilesBefore we begin, you may want to download the dataset (.csv) used in this tutorial. Be sure to right-click and save the file to your R working directory.
The Scale() FunctionThe scale() function makes use of the following arguments.
x: a numeric objectcenter: if TRUE, the objects' column means are subtracted from the values in those columns (ignoring NAs); if FALSE, centering is not performedscale: if TRUE, the centered column values are divided by the column's standard deviation (when center is also TRUE; otherwise, the root mean square is used); if FALSE, scaling is not performedCentering VariablesNormally, to center a variable, you would subtract the mean of all data points from each individual data point. With scale(), this can be accomplished in one simple call.
> #center variable A using the scale() function> scale(A, center = TRUE, scale = FALSE)You can verify these results by making the calculation by hand, as demonstrated in the following screenshot.

Centering a variable with the scale() function and by hand
Generating Z-ScoresNormally, to create z-scores (standardized scores) from a variable, you would subtract the mean of all data points from each individual data point, then divide those points by the standard deviation of all points. Again, this can be accomplished in one call using scale().
> #generate z-scores for variable A using the scale() function> scale(A, center = TRUE, scale = TRUE)Again, the following screenshot demonstrates equivalence between the function results and hand calculation.

Generating z-scores from a variable by hand and using the scale() function
Complete Scale() ExampleTo see a complete example of how scale() can be used to center variables and generate z-scores in R, please download the scale() example (.txt) file.
ReferencesThe official scale function manual page is available from: http://stat.ethz.ch/R-manual/R-patched/library/base/html/scale.html


To leave a comment for the author, please follow the link and comment on his blog:  R Tutorial Series.

R-bloggers.com offers daily e-mail updates about R news and tutorials on topics such as: visualization (ggplot2, Boxplots, maps, animation), programming (RStudio, Sweave, LaTeX, SQL, Eclipse, git, hadoop, Web Scraping) statistics (regression, PCA, time series,ecdf, trading) and more...

]]></description>
<dc:subject>R_bloggers centering R_Tutorial_Series r-project scale standardized_scores tutorial Variables z-scores</dc:subject>
<dc:identifier>https://pinboard.in/u:rahuldave/b:b1aa1aef81cd/</dc:identifier>
<taxo:topics><rdf:Bag>	<rdf:li rdf:resource="https://pinboard.in/u:rahuldave/t:R_bloggers"/>
	<rdf:li rdf:resource="https://pinboard.in/u:rahuldave/t:centering"/>
	<rdf:li rdf:resource="https://pinboard.in/u:rahuldave/t:R_Tutorial_Series"/>
	<rdf:li rdf:resource="https://pinboard.in/u:rahuldave/t:r-project"/>
	<rdf:li rdf:resource="https://pinboard.in/u:rahuldave/t:scale"/>
	<rdf:li rdf:resource="https://pinboard.in/u:rahuldave/t:standardized_scores"/>
	<rdf:li rdf:resource="https://pinboard.in/u:rahuldave/t:tutorial"/>
	<rdf:li rdf:resource="https://pinboard.in/u:rahuldave/t:Variables"/>
	<rdf:li rdf:resource="https://pinboard.in/u:rahuldave/t:z-scores"/>
</rdf:Bag></taxo:topics>
</item>
<item rdf:about="http://code.google.com/edu/languages/google-python-class/introduction.html">
    <title>Python Introduction - Google's Python Class - Google Code</title>
    <dc:date>2012-02-02T18:07:10+00:00</dc:date>
    <link>http://code.google.com/edu/languages/google-python-class/introduction.html</link>
    <dc:creator>rahuldave</dc:creator><dc:subject>google python programming tutorial</dc:subject>
<dc:source>https://pinboard.in/</dc:source>
<dc:identifier>https://pinboard.in/u:rahuldave/b:073050eb4a0a/</dc:identifier>
<taxo:topics><rdf:Bag>	<rdf:li rdf:resource="https://pinboard.in/u:rahuldave/t:google"/>
	<rdf:li rdf:resource="https://pinboard.in/u:rahuldave/t:python"/>
	<rdf:li rdf:resource="https://pinboard.in/u:rahuldave/t:programming"/>
	<rdf:li rdf:resource="https://pinboard.in/u:rahuldave/t:tutorial"/>
</rdf:Bag></taxo:topics>
</item>
<item rdf:about="http://feeds.arstechnica.com/~r/arstechnica/index/~3/tGM5tqWsxfY/tutorial-use-twitters-new-real-time-stream-api-in-python.ars">
    <title>feature: Tutorial: consuming Twitter's real-time stream API in Python</title>
    <dc:date>2010-04-21T17:45:00+00:00</dc:date>
    <link>http://feeds.arstechnica.com/~r/arstechnica/index/~3/tGM5tqWsxfY/tutorial-use-twitters-new-real-time-stream-api-in-python.ars</link>
    <dc:creator>rahuldave</dc:creator><description><![CDATA[
  
  
        
    
Twitter is preparing to launch several impressive new features, including a new streaming API that will give desktop client applications real-time access to the user's message timeline. The new streaming API was announced last week at Twitter's Chirp conference, where it was made available to conference attendees on-site for some preliminary experimentation. Twitter opened it up to the broader third-party developer community on Monday so that programmers can begin testing it to offer informed feedback.


This tutorial will show you how to  consume and process data from Twitter's new streaming API.  The code examples, which are written in the Python programming language, demonstrate how to establish a long-lived HTTP connection with PyCurl, buffer the incoming data, and process it to perform the basic message display functions of a Twitter client application. We will also take a close look at how the new streaming API differs from the existing polling-based REST API.
    
          
      
        
    
      Read the comments on this post


   
]]></description>
<dc:subject>Features Guides Open-source Web programming python tutorial twitter</dc:subject>
<dc:identifier>https://pinboard.in/u:rahuldave/b:58ebd66b4b7c/</dc:identifier>
<taxo:topics><rdf:Bag>	<rdf:li rdf:resource="https://pinboard.in/u:rahuldave/t:Features"/>
	<rdf:li rdf:resource="https://pinboard.in/u:rahuldave/t:Guides"/>
	<rdf:li rdf:resource="https://pinboard.in/u:rahuldave/t:Open-source"/>
	<rdf:li rdf:resource="https://pinboard.in/u:rahuldave/t:Web"/>
	<rdf:li rdf:resource="https://pinboard.in/u:rahuldave/t:programming"/>
	<rdf:li rdf:resource="https://pinboard.in/u:rahuldave/t:python"/>
	<rdf:li rdf:resource="https://pinboard.in/u:rahuldave/t:tutorial"/>
	<rdf:li rdf:resource="https://pinboard.in/u:rahuldave/t:twitter"/>
</rdf:Bag></taxo:topics>
</item>
</rdf:RDF>