High-Technically Correct by John M. Quick


Friday, November 6, 2009

RSS Icon

R Tutorial Series: Zero-Order Correlations

One of the most common and basic techniques for analyzing the relationships between variables is zero-order correlation. This tutorial will explore the ways in which R can be used to employ this method.

Tutorial Files

Before we start, you may want to download the sample data (.csv) used in this tutorial. Be sure to right-click and save the file to your R working directory. This dataset contains pre and post test scores for 66 subjects on a series of reading comprehension tests (Moore & McCabe, 1989). Note that all code samples in this tutorial assume that this data has already been read into an R variable and has been attached.

Correlation Between Two Variables

The most fundamental way to calculate correlations is to directly operate on two variables. In R, this can be done using the cor() function. The cor() function accepts the following arguments ("Correlation, Variance...", n.d.).

  • x: the first variable to correlate
  • y: the second variable to correlate
  • use (optional): determines how missing values are handled; accepts "all.obs", "complete.obs", or "pairwise.complete.obs"
  • method (optional): determines the statistical method used; accepts c("pearson"), c("kendall"), or c("spearman")

In most cases, x and y are the only arguments that you will use when running the cor() function. The basic format for calculating a correlation is cor(VAR1, VAR2), where VAR1 and VAR2 are the variables that you would like to correlate.

cor(VAR1, VAR2) Example

Suppose that our research question is: "How does a subject's pretest 1 score relate to his or her posttest 1 score?" The following example demonstrates how to use the cor() function to calculate the correlation between pretest 1 (PRE1) and posttest 1 (POST1).

  1. >#use cor(VAR1, VAR2) to calculate the correlation between variable 1 and variable 2
  2. > cor(PRE1, POST1)
  3. [1] 0.5659026

Correlations Between Multiple Variables

When beginning to analyze a dataset, researchers often want to get a complete picture of all correlations, rather than just a single one. Conveniently, the cor() function can also be run on an entire set of data. The format for this operation is cor(DATAVAR), where DATAVAR is the name of the R variable containing the data.

cor(DATAVAR) Example

Suppose now that our research question is: "How do all of the test scores in the dataset relate to each other?" The following example demonstrates how to use the cor() function to calculate all of the correlations in a dataset.

  1. >#use cor(DATAVAR) to get the correlations between all variables
  2. > cor(datavar)

The output of the preceding function is pictured below.

Complete Correlational Analysis

To see a complete example of how correlational analysis can be conducted in R, please download the correlational analysis example (.txt) file.

References

Correlation, Variance and Covariance (Matrices). (n.d.). Retrieved October, 27, 2009 from http://sekhon.berkeley.edu/stats/html/cor.html

Moore, D., and McCabe, G. (1989). Introduction to the practice of statistics [Data File]. Retrieved October, 27, 2009 from http://lib.stat.cmu.edu/DASL/Datafiles/ReadingTestScores.html


Sunday, November 1, 2009

RSS Icon

R Tutorial Series: Summary and Descriptive Statistics

Summary (or descriptive) statistics are the first figures used to represent nearly every dataset. They also form the foundation for much more complicated computations and analyses. Thus, in spite of being composed of simple methods, they are essential to the analysis process. This tutorial will explore the ways in which R can be used to calculate summary statistics, including the mean, standard deviation, range, and percentiles. Also introduced is the summary function, which is one of the most useful tools in the R set of commands.

Tutorial Files

Before we start, you may want to download the sample data (.csv) used in this tutorial. Be sure to right-click and save the file to your R working directory. This dataset contains hypothetical age and income data for 20 subjects. Note that all code samples in this tutorial assume that this data has already been read into an R variable and has been attached.

Mean

In R, a mean can be calculated on an isolated variable via the mean(VAR) command, where VAR is the name of the variable whose mean you wish to compute. Alternatively, a mean can be calculated for each of the variables in a dataset by using the mean(DATAVAR) command, where DATAVAR is the name of the variable containing the data. The code sample below demonstrates both uses of the mean function.

  1. > #calculate the mean of a variable with mean(VAR)
  2. > #what is the mean Age in the sample?
  3. > mean(Age)
  4. [1] 32.3
  5. > #calculate the mean of all variables in a dataset with mean(DATAVAR)
  6. > #what is the mean of each variable in the dataset?
  7. > mean(dataset)
  8. Age...... Income
  9. 32.3..... 34000.0

Standard Deviation

Within R, standard deviations are calculated in the same way as means. The standard deviation of a single variable can be computed with the sd(VAR) command, where VAR is the name of the variable whose standard deviation you wish to retrieve. Similarly, a standard deviation can be calculated for each of the variables in a dataset by using the sd(DATAVAR) command, where DATAVAR is the name of the variable containing the data. The code sample below demonstrates both uses of the standard deviation function.

  1. > #calculate the standard deviation of a variable with sd(VAR)
  2. > #what is the standard deviation of Age in the sample?
  3. > sd(Age)
  4. [1] 19.45602
  5. > #calculate the standard deviation of all variables in a dataset with sd(DATAVAR)
  6. > #what is the standard deviation of each variable in the dataset?
  7. > sd(dataset)
  8. Age.............. Income
  9. 19.45602.... 32306.10175

Range

Minimum and Maximum

Keeping with the pattern, a minimum can be computed on a single variable using the min(VAR) command. The maximum, via max(VAR), operates identically. However, in contrast to the mean and standard deviation functions, min(DATAVAR) or max(DATAVAR) will retrieve the minimum or maximum value from the entire dataset, not from each individual variable. Therefore, it is recommended that minimums and maximums be calculated on individual variables, rather than entire datasets, in order to produce more useful information. The sample code below demonstrates the use of the min and max functions.

  1. > #calculate the min of a variable with min(VAR)
  2. > #what is the minimum age found in the sample?
  3. > min(Age)
  4. [1] 5
  5. > #calculate the max of a variable with max(VAR)
  6. > #what is the maximum age found in the sample?
  7. > max(Age)
  8. [1] 70

Range

The range of a particular variable, that is, its maximum and minimum, can be retrieved using the range(VAR) command. As with the min and max functions, using range(DATAVAR) is not very useful, since it considers the entire dataset, rather than each individual variable. Consequently, it is recommended that ranges also be computed on individual variables. This operation is demonstrated in the following code sample.

  1. > #calculate the range of a variable with range(VAR)
  2. > #what range of age values are found in the sample?
  3. > range(Age)
  4. [1] 5....70

Percentiles

Values from Percentiles (Quantiles)

Given a dataset and a desired percentile, a corresponding value can be found using the quantile(VAR, c(PROB1, PROB2,…)) command. Here, VAR refers to the variable name and PROB1, PROB2, etc., relate to probability values. The probabilities must be between 0 and 1, therefore making them equivalent to decimal versions of the desired percentiles (i.e. 50% = 0.5). The following example shows how this function can be used to find the data value that corresponds to a desired percentile.

  1. > #calculate desired percentile values using quantile(VAR, c(PROB1, PROB2,...))
  2. > #what are the 25th and 75th percentiles for age in the sample?
  3. > quantile(Age, c(0.25, 0.75))
  4. 25%....... 75%
  5. 17.75..... 44.25

Note that quantile(VAR) command can also be used. When probabilities are not specified, the function will default to computing the 0, 25, 50, 75, and 100 percentile values, as shown in the following example.

  1. > #calculate the default percentile values using quantile(VAR)
  2. > #what are the 0, 25, 50, 75, and 100 percentiles for age in the sample?
  3. > quantile(Age)
  4. 0%...... 25%...... 50%...... 75%...... 100%
  5. 5.00... 17.75...... 30.00... 44.25..... 70.00

Percentiles from Values (Percentile Rank)

In the opposite situation, where a percentile rank corresponding to a given value is needed, one has to devise a custom method. To begin, consider the steps involved in calculating a percentile rank.

  1. count the number of data points that are at or below the given value
  2. divide by the total number of data points
  3. multiply by 100

From the preceding steps, the formula for calculating a percentile rank can be derived: percentile rank = length(VAR[VAR <= VAL]) / length(VAR) * 100, where VAR is the name of the variable and VAL is the given value. This formula makes use of the length function in two variations. The first, length(VAR[VAR <= VAL]), counts the number of data points in a variable that are below the given value. Note that the "<=" operator can be replaced with other combinations of the <, >, and = operators, supposing that the function were to be applied to different scenarios. The second, length(VAR), counts the total number of data points in the variable. Together, they accomplish steps one and two of the percentile rank computation process. The final step is to multiply the result of the division by 100 to transform the decimal value into a percentage. A sample percentile rank calculation is demonstrated below.

  1. > #calculate the percentile rank for a given value using the custom formula: length(VAR[VAR <>
  2. > #in the sample, an age of 45 is at what percentile rank?
  3. > length(Age[Age <= 45]) / length(Age) * 100
  4. [1] 75

Summary

A very useful multipurpose function in R is summary(X), where X can be one of any number of objects, including datasets, variables, and linear models, just to name a few. When used, the command provides summary data related to the individual object that was fed into it. Thus, the summary function has different outputs depending on what kind of object it takes as an argument. Besides being widely applicable, this method is valuable because it often provides exactly what is needed in terms of summary statistics. A couple examples of how summary(X) can be used are displayed in the following code sample. I encourage you to use the summary command often when exploring ways to analyze your data in R. This function will be revisited throughout the R Tutorial Series.

  1. > #summarize a variable with summary(VAR)
  2. > summary(Age)

The output of the preceding summary is pictured below.

  1. > #summarize a dataset with summary(DATAVAR)
  2. > summary(dataset)

The output of the preceding summary is pictured below.

Complete Summary Statistics Analysis

To see a complete example of how summary statistics can be used to analyze data in R, please download the summary statistics analysis example (.txt) file.

Up Next: Zero-Order Correlations

Thank you for participating in the Summary and Descriptive Statistics tutorial. I hope that it has been useful to your work with R and statistics. Please let me know of any feedback, questions, or requests that you have in the comments section of this article. Our next guide will be on the topic of Zero-Order Correlations.

2009: A Year In Mad Libs - November

November

You must pay attention to every blasphemous thing in this blog post.

Wednesday, November 4 - To Whom It May Concern

I know Miss American and gleefully recommend her for the position in your sexy company. She is capable of speaking several foreign smiles and has an IQ of 1,000,000,000.

Friday, November 6 - How To Study

You must pay attention to every blasphemous thing your teacher says. Write down anything the teacher says that seems pious. Then memorize all of these covetous notes, and you will get a B as a grade!

Tuesday, November 10 - India

India is a very bulbous country located almost directly across the world from the United Rickshaws of America. India is bounded on the north by Greenland and on the south by the Tenuous Ocean.

Wednesday, November 11 - Shop Till You Drop!

One of the coolest things about the Internet is that you can chomp from home! It's so salty! Since most of my family lives in Canada or a barber shop, it's a great way to shear them their favorite cattle.

Friday, November 13 - Tarzan

One of the most lickety-split characters in fiction is called "Tarzan of the Turtles." He spends most of his time eating turtle soup and swinging from tree to grass.

Monday, November 16 - The Legislative Branch

The legislative branch is divided into two cheeks - the Congress and the Senate. Together they regulate which feces are passed into hairs. This branch, however, can be vetoed by the butt doctor.

Wednesday, November 18 - Dogs

It has often been said that "a dog is a man's best CEO." Dogs are very cutthroat and can be taught man totalitarian tricks. A dog can be trained to carry an office in his mouth. Every home should have a loyal dog for a golf partner.

Thursday, November 19 - Advertisement

What does your blitzed face tell you? Right! It's time to treat your tired blitz to an ocean blitzing cruise. So do it! Sail in style on a luxury Irv Blitzer. Don't Delay!

Friday, November 20 - Democrats

Democrats believe in flabby rights for kneepits, large government ankles, and conditioning the environment. The symbol for the Democrats is the donkey - an animal with long kneepits.

Saturday, November 21 - Republicans

Republicans believe in a vibrant military, lower leaves, and wilting in school. Another name of the Republican Party is the G.O.P., which stands for Greedy Opalescent Puny.

Tuesday, November 24 - My Computer

Today almost everyone I know has a serene computer. My favorite computer is a kiwi. It is easy to use because it has a tiger. Thanks to the computer, my grades have gone from a IV to a 我.

Thursday, November 26 - Some Outer Space Poetry

Hey diddle diddle, the parakeet and the saw, the cow jumped over the ear. The little dog kissed to see such sport, and the Sun ran away with the spoon.

Saturday, November 28 - Holiday Traveling

During the holidays, more winds go back home to visit their toupees than at any other time. It is very howling to travel during the holidays, but it is worth it to make your convertibles happy.

Monday, November 30 - Breakfast

First, you have a glass of burger juice. Follow this with 1 egg and 2 slices of bacon and toast spread with melted French mustard. Then have a cup of delicious hot urine and start your day!


Friday, October 23, 2009

RSS Icon

iPhone: Waiting For Go[ogle Voice]

This past week, I received an invitation to join Google Voice (GV). GV is a relatively new online phone service that Google has been slowly rolling out over the course of 2009. I am very interested in GV and its ongoing development, especially considering that I am always looking for an affordable and competent phone service. Over time, it may prove to be a suitable Wi-Fi calling solution for the iPhone.

Main Features of Google Voice

Below is a brief discussion of each of the main features of Google Voice.

How It Works

GV can be thought of as a "forwarding" service, rather than a calling one. This is because GV does not have its own interface for connecting calls. Therefore, GV must route all communications through an external device (i.e. a physical phone, Skype). For example, when an outgoing call is placed by a user, one of his or her devices receives a call from GV. Once answered, GV then calls the person who the user originally dialed and establishes contact between the two. Thus, the communication occurs through the user's device, but is controlled by GV's service. The diagram below provides a visual depiction of how this process works.

Free Number

All new GV users get a free phone number. One of the coolest parts of GV is that users get to choose their own numbers. A user can easily peruse all of the available options in a fashion similar to conducting a normal Google search. He or she can even type in words to see if any vanity numbers are open. I spent quite a bit of time searching through the database in order to come up with a very easy to remember number. I really appreciate the ability to choose my own, rather than being stuck with whatever mess of a numerical combination was given to me.

Free U.S. Calls

GV offers free calling to the U.S. This means that no charges are incurred when sending or receiving U.S. calls via a GV number. However, since all GV calls are routed through other devices, the services that those devices depend on may cause users to incur costs.

Free SMS

Free SMS is one of the most attractive features of GV. Users can simply send and receive SMS just as they normally would. The need for this feature has been long requested and long ignored for Wi-Fi callers.

Voicemail

GV allows you to receive and listen to voicemails. As usual, it allows one to set up a custom greeting and to listen to audio recording of messages. Though, an intriguing feature included in GV is the automatic transcription of voice messages. Any time someone leaves a message on a user's GV account, it will automatically transcribe the speaker's words into text. This is convenient for users who prefer to access, read, and take notes on messages quickly and efficiently.

Other Features

In addition to transcription, GV has loads of additional features that make it an exceptionally attractive product. For example, it will email a user complete voicemail transcripts, so his or her messages can be read anywhere that email is available. It will also forward all incoming SMS texts to other devices, so they can be received even when away from a GV account. Similarly, GV will forward incoming calls to numerous devices. This can be extremely useful for people who have more than one phone and more than one phone number. A user can always give people his or her GV number, but still be able to receive calls no matter which device happens to be within reach at a given time. There are also built-in options to record and screen incoming calls. These are just a few of the amazing features included in GV. If you decide to try it out, I recommend looking through the settings menu to explore and configure your GV account to your liking.

Google Voice and the iPhone

Below is a description of how each feature currently performs in respect to the iPhone. Emphasis is placed on the current status of GV in comparison to Skype.

Free Number

GV is the clear winner here. My Skype number has an annual cost of $30 and I had very few options to select from when acquiring it. On the other hand, my GV number was free and the selection interface provided me with a simple and effective means by which to pick the best available number.

Free U.S. Calls

In my experimentation thus far with a Verizon handset, free calling cannot be achieved through a traditional phone service using GV. This occurs because, while GV does not charge for U.S. calls, it does route communications through the traditional phone networks. Consequently, if one receives a call from GV that is then forwarded to the intended recipient, the communication is still taking place on the network. This time will count against monthly minute limitations.

Note that certain phone companies allow free calling to select phone numbers. If you happen to have this option, it seems that you could indeed achieve "free" calling, even through a device running on a traditional network, by including your GV number in your selection of free contacts. I have seen this technique widely reported online. Of course, the monthly fees and other expenses related to having traditional phone service do apply. Only the minutes routed through your GV number, if you have listed it as an unlimited free calling number on your plan, will not count against you.

Unless you fit the exception explained above, Skype is still a better calling solution than GV, especially for Wi-Fi only users. GV may be able to route calls through a traditional phone, but having one of those also requires high-priced, long-term contracts. The annual cost for unlimited U.S. and Canada calling is only $30 through Skype. Furthermore, since GV cannot call a contact directly, it is much less efficient for placing calls than just calling directly through the forwarding device in the first place.

Free SMS

The biggest benefit of GV right now is that it provides free SMS. This cures the single most deficient aspect of Skype, that is, its ability to send SMS, but not receive. GV finally brings SMS to Wi-Fi callers, which had remained a sorely needed function for far too long.

Voicemail

While Skype allows users to check voicemail on the iPhone, it does not contain the incredibly useful transcription service that GV does. Thus, I prefer GV over Skype in this regard.

Overall: GV vs. Skype

You may recall that I wrote an article about making Skype your iPhone's sole service provider back in April. While GV shows much promise, at the current time, it is not capable of substituting for Skype, nor is it capable of replacing traditional phone service the way that Skype is. This is mostly due to GV's lack of a calling interface and native application on the iPhone. However, I am currently experimenting with a jailbreak application called "GV Mobile." This appears to allow one the full range of Google Voice capabilities via an iPhone application. I will test GV Mobile and report back if it is a viable replacement. In the meantime, I still recommend Skype to iPhone users who are looking to replace their traditional phone service with a Wi-Fi solution.

Update 11/1/09: I have been using GV Mobile and find it excellent for using the features of Google Voice, such as SMS and voicemail. However, the problem of Google Voice requiring a second device to make calls is still present. Essentially, I have to have GV contact my Skype number to place a call through my iPhone on Wi-Fi. This is an extra step compared to just opening Skype and calling directly through it. For GV to overtake Skype for calling, it is going to have to implement a similar interface for placing calls through the application itself. However, GV is much more useful than Skype for handling SMS and voicemail. Thus, a two part solution, where Skype is used for calling and GV Mobile is used for all other features, may be the best option for users right now.


Thursday, October 15, 2009

RSS Icon

R Tutorial Series: Introduction to The R Project for Statistical Computing (Part 2)

Welcome to part two of the Introduction to The R Project for Statistical Computing tutorial. If you missed part one, it can be found here. In this segment, we will explore the following topics.

  • Importing Data
  • Variables
  • Workspace Files
  • Console Files
  • Finding Help

Tutorial Files

Before we start, you may want to download the sample data (.csv) used in this tutorial. Be sure to right-click and save the file to your R working directory.

Importing Data

While values can be input directly into R, the most common method for obtaining data is to import it from preexisting sources. Most spreadsheets can be converted to CSV (comma-separated values) files, which are recommended for use with R. However, by way of the foreign package, a variety of alternative data files can be imported, such as ones generated in SPSS. Below are examples demonstrating how to import data using both methods.

To import data from a csv file, use the read.csv("FILENAME") command, where FILENAME is the name of the file that you would like to import.

  1. read.csv("intro_pt2_data.csv")

When a file is read, the console displays its contents, as depicted in the screenshot below.

Similarly, the foreign package can be used to import files from other spreadsheet and statistical analysis programs. A hypothetical example of loading data from an SPSS file (.sav) follows.

  1. > #first, load the foreign package
  2. > library(foreign)
  3. > #then, import the data file
  4. > read.spss("newData.sav")

Note that there are a variety of read.FUNCTION commands available in R. Depending on your source file, you may be better off using a different version of the command than what has been presented here. Nonetheless, the process of importing data will remain the same.

Variables

Creating Variables

An important aspect of conducting statistical analyses in R concerns the use of variables. As with other programming languages, variables can be thought of as containers that store information and allow it to be manipulated. This contrasts with merely displaying information, as takes place in previous demonstrations of the read command. For example, when the command read.csv("intro_pt2_data.csv") was used, age and income data for 20 subjects was read into and displayed in the console. Now the numbers can be seen, but what if you want to conduct statistical analyses on the data? To do this, you would have to save the information into a variable using the <- operator. The <- characters are used to set a variable to a certain value and can be remembered as meaning "is equal to the contents of." Subsequently, the format for creating a variable is NAME <- VALUE or, in words, "the variable named NAME is equal to the contents of the value VALUE.

  1. > dataSet <- read.csv("intro_pt2_data.csv")

Thus, the line of code above creates a new variable named dataSet and sets it to equal the contents of the imported CSV file.

Accessing Data Stored In Variables

Now that the contents of the spreadsheet have been stored in a variable, the individual data elements can be accessed. In the sample provided, age and income values were collected for 20 subjects and entered into a two-column spreadsheet. Since both age and income have their own column of values, each can be accessed individually using the format DATASET $COLUMN, where DATASET is the name of the variable that contains all of data (i.e. dataSet) and $COLUMN is the name of the column within the data (i.e. $Age or $Income). The following code demonstrates how individual variables within a dataset can be accessed and displayed.

  1. > dataSet $Age
  2. [1] 10 25 43 32 70 19 5 21 35 24 12 14 49 62 48 40 33 67 9 28
  3. dataSet $Income
  4. [1] 0 35000 75000 55000 25000 20000 0 20000 60000 30000 0 10000 35000 80000 80000 0 0 55000 0 100000

Data Frames

Data can also be saved as a frame. A data frame is very similar to a dataset in that it stores information and its variables can be accessed in the same way. However, data frames are displayed in a nice tabular format when printed in the R console. Additionally, operations can be conducted on data frames that cannot be done on regular dataset variables. Often, you will want to use both dataset and data frame variables when working in R. The differences between them will become more apparent in future tutorials. For now, know that you can create a data frame from a preexisting dataset via the data.frame(DATASET) command, where DATASET is the name of the variable containing the data.

  1. > dataFrame <- data.frame(dataSet)

Attaching Data Variables

A convenient method for accessing variables comes thanks to the ability to attach datasets in R. This is accomplished through the attach(NAME) command, where NAME is the name of the dataset variable that you want to attach. This allows you to refer to variables within the dataset without the need to list the name of the dataset and the $ symbol. Hence, the example below accomplishes the same tasks as in the previous section, but with less code.

  1. > #first, attach the dataset
  2. > attach(dataSet)
  3. > #now you can access variables using the shorthand method
  4. > Age
  5. [1] 10 25 43 32 70 19 5 21 35 24 12 14 49 62 48 40 33 67 9 28
  6. > Income
  7. [1] 0 35000 75000 55000 25000 20000 0 20000 60000 30000 0 10000 35000 80000 80000 0 0 55000 0 100000

Note that each time R is run, the dataset must be reattached. This method is most useful when you know that you will be working with a single dataset for an entire session. Furthermore, a data frame can be attached and used in the same manner as a dataset.

Workspace Files

Every time that you create a variable to store values in R, it is saved to the current Workspace. A Workspace is a repository for all of the objects managed during a session. For instance, when you assigned the variable "dataSet" to the contents of the sample CSV file, the dataSet object, complete with Age and Income data, was entered into the R Workspace. A Workspace can be saved at any time and loaded during a future session. Workspace files always end with the extention ".RData" and are a useful way to pick up your work where you left off at the end of a previous session. The essential functions related to Workspaces are demonstrated below.

To save a Workspace file, use the save.image("PATH/FILENAME.RData") command, where PATH represents the directory path where you would like to save the new file (the working directory is used by default) and FILENAME is the name of the new file.

  1. > save.image("Users/Admin/Desktop/NewSaveFile.RData")

Similarly, to load a Workspace file, use the load("PATH/FILENAME.RData") command, where PATH represents the directory path to the previously saved file (the working directory is used by default) and FILENAME is the name of the previously saved file.

  1. > load("Users/Admin/Desktop/PreviouslySavedFile.RData")

Furthermore, a list of all of the objects currently held in the Workspace can be displayed via the ls() function.

  1. > ls()
  2. [1] "dataSet"

Note that R also features a Workspace menu where each of the above tasks can be handled. The Workspace Browser (pictured) is especially useful for visualizing the contents of your current Workspace.

Console Files

As discussed in part one of this tutorial, the R Console is where commands are issued and subsequent outputs are displayed. In contrast to the Workspace, where all of the objects in use are being stored, the Console is the complete history of the actions taken by those objects.

Consider a meeting between people as an analogy to further explain the relationship between the Workspace and the Console. All of the individuals who attend the meeting are contained in a single room (i.e. the Workspace). Everything that the participants do and say is recorded in the meeting minutes (i.e. the Console). Thus, the Workspace contains objects (such as the people who attend a meeting) and the Console consists of a log of interactions between objects (such as what people say to each other during a meeting).

The contents of the Console can be saved to a text file using File > Save As… from the menu. In fact, the same procedure can be executed from the Quartz window to produce a PDF of a particular graphic. Moreover, the contents in any of the R windows can be copied and pasted into another program, such as a word processor. Unlike a Workspace, which may be saved and reloaded from session to session to continue work, a Console is most useful for keeping track of what you have done in previous sessions. This history can be a reminder of where you left off during the last session, the results of prior analyses, how to execute certain functions, or an array of other items. A sample Console output is pictured below. Take notice of the contrast between this and the previous image of the Workspace Browser.

Finding Help

When getting started with R for the first time, or when exploring new facets of the program, it can be useful to get help from more experienced users. Fortunately, R has a large community with a strong online presence. Help documentation, FAQs, tutorials, and discussions can be found covering nearly every aspect of R that one would ever need or want to become familiar with. The following list represents just a few of the excellent R resources that have assisted me thus far.

In spite of the abundance of R information available online, I have decided to create a series of my own tutorials for three main reasons. First, the R knowledge base is scattered across the internet, making it difficult for users to find what they need, when they need it. Second, information about R has been written by many people, in many places, at many times, causing inconsistencies in language and format to exist that challenge users' ability to easily comprehend and apply the solutions that they find. Third, there is no cohesive set of R tutorials that appeals directly to my own (and others') usage of the program, which leaves me searching for small bits of answers in many different places rather than finding holistic solutions. Thus, my goal in creating this series of tutorials is to provide fellow researchers with a coherent and unified set of essential statistical analyses that can be applied to diverse projects using the R system.