#!/usr/bin/env Rscript
# Title:
# Version:
# Author: Frédéric CHEVALIER <fcheval@txbiomedgenetics.org>
# Created in: 2014-0
# Modified in:
#==========#
# Comments #
#==========#
#===================#
# Packages required #
#===================#
# library()
#===========#
# Functions #
#===========#
#------------------------#
# Function to save plots #
#------------------------#
save.myplot <- function (filename, width=8, height=8) {
# Folder creation for graphic output (if does not exist)
if (file.exists("Graphs/") == FALSE) {dir.create("Graphs")}
# Graphic saving (png and eps formats)
dev.copy(png,paste("Graphs/",filename,".png",sep=""), width=width*72, height=height*72, bg="white")
dev.off()
dev.copy2pdf(file=paste("Graphs/",filename,".pdf",sep=""), width=width, height=height)
}
#-------------------------#
# Function to save tables #
#-------------------------#
save.mytable <- function (x, filename, ext=".tsv", sep="\t", col.names=FALSE, row.names=FALSE, append=FALSE){
# Folder creation for table output (if does not exist)
if (file.exists("Results/") == FALSE) {dir.create("Results")}
# Data export
write.table(x, file=paste("Results/",filename, ext, sep=""), col.names=col.names, row.names=row.names, append=append, sep=sep)
}
#===========#
# Variables #
#===========#
# Data file
myfile <- ""
mydata <- read.csv(myfile, header=TRUE, sep=";")
# Object contaning the input file name
filename <- strsplit(myfile,".csv")
#=================#
# Data processing #
#=================#
#========#
# Curves #
#========#
#=========#
# Figures #
#=========#