Saturday, January 15, 2011

R Code Documentation Template

# *------------------------------------------------------------------
# | PROGRAM NAME: 
# | DATE: 
# | CREATED BY:  
# | PROJECT FILE:              
# *----------------------------------------------------------------
# | PURPOSE:               
# |
# *------------------------------------------------------------------
# | COMMENTS:               
# |
# |  1:  
# |  2: 
# |  3: 
# |*------------------------------------------------------------------
# | DATA USED:               
# |
# |
# |*------------------------------------------------------------------
# | CONTENTS:               
# |
# |  PART 1:  
# |  PART 2: 
# |  PART 3: 
# *-----------------------------------------------------------------
# | UPDATES:               
# |
# |
# *------------------------------------------------------------------
 
 
 setwd('/Users/wkuuser/Desktop/R Data Sets') # mac 
 
 setwd("P:\\R  Code References\\R Data") # windows
 
 rm(list=ls()) # get rid of any existing data 
 ls() # view open data sets
 
# IMPORT CSV FILE
 
YOURDATA <- read.csv("NAME.csv", na.strings=c(".", "NA", "", "?"), encoding="UTF-8")
 
# *------------------------------------------------------------------
# |                
# |
# |   
# |
# |                
# |
# |   
# |  
# |  
# *-----------------------------------------------------------------
 
 
# *------------------------------------------------------------------
# |                
# |
# |  
# |  
# *-----------------------------------------------------------------
 
 
# *------------------------------------------------------------------
# |               
# *-----------------------------------------------------------------
 
 
 
 
 
 
 
 
 
 
 

 
Created by Pretty R at inside-R.org

No comments:

Post a Comment