To use this program, follow these steps:
  1. Open a text editor
  2. COPY the program below and PASTE it into the editor window
  3. Edit the program so that the "PUT-LOCAL-PATH-TO-DATA-FILE-HERE" specification points to where the data file is stored on your system
  4. SELECT ALL and COPY the program then PASTE it into your R console
The program is below this line. If no program is listed, the URL to the EML document may be in error. If the EML file does not include all the information needed, the SAS program will have errors or be incomplete.

# Package ID: knb-lter-vcr.147.2 Cataloging System:VCR.
# Data set title: Keywords and Terms from the LTER Network.
# Data set creator:  John Porter -  
# Data set creator:  Duane  Costa -  
# Data set creator:  John Porter -  
#  Metadata Provider:    - Virginia Coast Reserve Long-Term Ecological Research Project 
#  Contact:  John Porter -    - jhp7e@virginia.edu
#  Contact:    - Information manager - Virginia Coast Reserve Long-Term Ecological Research Project   - jporter@lternet.edu 
# You should replace 'PUT-LOCAL-PATH-TO-DATA-FILE-HERE'  (below) with the appropriate path.   
#   to your data file (e.g., c:\mydata\datafile.txt).                         
infile1  <- file("PUT-LOCAL-PATH-TO-DATA-FILE-HERE", open="r")  
 dataTable1 <-read.csv(infile1, 
            ,sep="\t"  
                ,quot='"' 
        , col.names=c(
                    "TERM",     
                    "DTOC_NSITES",     
                    "DTOC_NU",     
                    "EA_SITES",     
                    "EA_USES",     
                    "EK_SITES",     
                    "EK_USES",     
                    "ET_SITES",     
                    "ET_USES",     
                    "PUB_NSITES",     
                    "PUB_NUSES",     
                    "NLISTS",     
                    "MAXSITES",     
                    "MINSITES",     
                    "MAXUSES",     
                    "MINUSES",     
                    "ISTERM"    ), check.names=TRUE)

               

 
tmp_var <- character()
tmp_label <- character()
                       tmp_var <- c(tmp_var , "TERM") 
                       tmp_label <- c(tmp_label , "Word or Term- ")
                       tmp_var <- c(tmp_var , "DTOC_NSITES") 
                       tmp_label <- c(tmp_label , "Number of sites using in DTOC- none")
                       tmp_var <- c(tmp_var , "DTOC_NU") 
                       tmp_label <- c(tmp_label , "Number of uses in DTOC- none")
                       tmp_var <- c(tmp_var , "EA_SITES") 
                       tmp_label <- c(tmp_label , "Number of sites using in EML Attributes- none")
                       tmp_var <- c(tmp_var , "EA_USES") 
                       tmp_label <- c(tmp_label , "Number of uses in EML Attributes- none")
                       tmp_var <- c(tmp_var , "EK_SITES") 
                       tmp_label <- c(tmp_label , "Number of sites using in EML Keyword- none")
                       tmp_var <- c(tmp_var , "EK_USES") 
                       tmp_label <- c(tmp_label , "Number of uses in EML Keywords- none")
                       tmp_var <- c(tmp_var , "ET_SITES") 
                       tmp_label <- c(tmp_label , "Number of sites using in EML Titles- none")
                       tmp_var <- c(tmp_var , "ET_USES") 
                       tmp_label <- c(tmp_label , "Number of uses in EML Titles- none")
                       tmp_var <- c(tmp_var , "PUB_NSITES") 
                       tmp_label <- c(tmp_label , "Number of sites using in publication titles- none")
                       tmp_var <- c(tmp_var , "PUB_NUSES") 
                       tmp_label <- c(tmp_label , "Number of uses in publication titles- none")
                       tmp_var <- c(tmp_var , "NLISTS") 
                       tmp_label <- c(tmp_label , "Number of lists word or term occurs in- none")
                       tmp_var <- c(tmp_var , "MAXSITES") 
                       tmp_label <- c(tmp_label , "Maximum number of sites within a list where a word was used- none")
                       tmp_var <- c(tmp_var , "MINSITES") 
                       tmp_label <- c(tmp_label , "Minimum number of sites within a list where a word was used- none")
                       tmp_var <- c(tmp_var , "MAXUSES") 
                       tmp_label <- c(tmp_label , "Maximum number of uses within a list where a word was used- none")
                       tmp_var <- c(tmp_var , "MINUSES") 
                       tmp_label <- c(tmp_label , "Minimum number of uses within a list where a word was used- none")
                       tmp_var <- c(tmp_var , "ISTERM") 
                       tmp_label <- c(tmp_label , "Is it a multi-word term?- ")
labelFrame1<-data.frame(variable=tmp_var, label=tmp_label)
rm(tmp_var, tmp_label)        
 

tmp_var <- character()
tmp_code <- character()                
tmp_label <- character() 
tmp_var <- c(tmp_var,"ISTERM")   
tmp_code <- c(tmp_code,"0")   
tmp_label <- c(tmp_label,"No, only a single word")  
tmp_var <- c(tmp_var,"ISTERM")   
tmp_code <- c(tmp_code,"1")   
tmp_label <- c(tmp_label,"Yes, it is a multi-word term")  
codeLabelFrame1 <- data.frame(variable=tmp_var, code=tmp_code, label=tmp_label) 
rm(tmp_var, tmp_label, tmp_code) 
                
# HERE IS A LIST  OF VARIABLES from  dataTable1  AND LABELS FOR THOSE VARIABLES
labelFrame1   
                
 # HERE IS A LIST OF VARIABLES TO WHICH CODES HAD BEEN ASSIGNED               
codeLabelFrame1           
                
attach(dataTable1)               
# The analyses below are basic descriptions of the variables. After testing, they should be replaced.                 
        
                 
summary(as.factor(TERM))  
summary(as.factor(ISTERM))  
summary(as.numeric(DTOC_NSITES))  
summary(as.numeric(DTOC_NU))  
summary(as.numeric(EA_SITES))  
summary(as.numeric(EA_USES))  
summary(as.numeric(EK_SITES))  
summary(as.numeric(EK_USES))  
summary(as.numeric(ET_SITES))  
summary(as.numeric(ET_USES))  
summary(as.numeric(PUB_NSITES))  
summary(as.numeric(PUB_NUSES))  
summary(as.numeric(NLISTS))  
summary(as.numeric(MAXSITES))  
summary(as.numeric(MINSITES))  
summary(as.numeric(MAXUSES))  
summary(as.numeric(MINUSES))