#-----------------------------------
# Description of your script
#
# @author: Duy Dinh
# @date: 09 June 2012
##-----------------------------------
# INPUT: usually a Column Separated Value file
filename="csv-file.txt"
# Output directory
outputpath="your-output-directory"
#outputImage=TRUE
outputImage=FALSE
# output image
outputImg = paste(path, "output", sep="/")
outputImg = paste(outputImg, "eps", sep=".")
# start graphics drawing
if (outputImage == TRUE){
postscript(file=outputImg, horizontal=FALSE, width=15, height=8)
#png(filename=outputImg)
}
# Read data
data = read.table(filename, header=FALSE)
# process data
# do what you need with data
# turn off graphical device
if (outputImage){
dev.off()
}
Last edit: Duy Dinh 2012-06-09
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
#----------------------------------- # Description of your script # # @author: Duy Dinh # @date: 09 June 2012 ##----------------------------------- # INPUT: usually a Column Separated Value file filename="csv-file.txt" # Output directory outputpath="your-output-directory" #outputImage=TRUE outputImage=FALSE # output image outputImg = paste(path, "output", sep="/") outputImg = paste(outputImg, "eps", sep=".") # start graphics drawing if (outputImage == TRUE){ postscript(file=outputImg, horizontal=FALSE, width=15, height=8) #png(filename=outputImg) } # Read data data = read.table(filename, header=FALSE) # process data # do what you need with data # turn off graphical device if (outputImage){ dev.off() }Last edit: Duy Dinh 2012-06-09