Tutorial

::

Collecting and Analyzing Data with TGrep2

 
[Step 0: Setting up TGrep2 Step 1: Collecting Data with TGrep2 Step 2: Preparing a database Step 3: Analyzing your data]
 

Step 3: Analyzing your data

Reading data file in R

Now we have a tab-separated data file that can be loaded in R with the following command:

    desired_name <- read.delim("FILENAME",header=T)

If you haven't set your working directory, you will need to put the path in the above filename (like c:\rfiles\FILENAME on Windows, ~/Documents/rfiles/FILENAME on OSX or Linux/Unix)

A comma-separated data file can be loaded with:

    desired_name <- read.csv("FILENAME",header=T)

Files with arbitrary delimeters can be loaded with:

    desired_name <- read.delim("FILENAME",header=T,sep="DELIMTER")

Now perform your analysis!

Reading data file in Excel

  1. Open Excel.
  2. Select File...Open.
  3. Select your file. The "Text Import Wizard" will open.
  4. Select Delimited.
  5. On the next page, select Tab (or comma, or whatever you have) as the delimiter.
  6. Click Finish, and your file is loaded!
 
[Step 0: Setting up TGrep2 Step 1: Collecting Data with TGrep2 Step 2: Preparing a database Step 3: Analyzing your data]