Create PreProc.QC.LSC.R

USAGE INSTRUCTIONS:
source the package by saving the code as an .R file in your directory where the peak-picked data is held and paste the following command into your R console adding in the address of your study directory:
> source('your_working_directory_address/PreProc.QC.RLSC.R')
Package dependencies:- requires the "zoo" package
Paste 
>install.packages("zoo")
into R console to automatically install this package to your library. 
Performs QC based LOESS curve signal correction. Returns tables of original, curve values, corrected signal intensity data and a summary table of the reproducible features following signal correction. Plots are automatically generated in a new folder "QC.LSC.Scatterplots" for features for which there has been a greater than 2 fold improvement in the %CV these can then be examined by the experimenter.
(TROUBLE SHOOTING TIP: possible errors may be encountered if the XCMS diffreport is altered or names of columns in the table are changed) 
X-XCMS diffreport saved as a .csv file
CCQC - number of column conditioning QCs (default is 30)
QCInt - QC injection interval (default is 5 or every 4th sample) 
SGroups - number of study groups in the sample ie. mzXML file subdirectories prior to XCMS peak-picking (defaults to 3 a good subdirectory structure is to have QCs, samples and blanks in 3 seperate subdirectories).
f - the smoother span (proportion of points in the plot which influence the smooth at each value)(default is 2/3). 
a - alpha for generalized log transform (default is 1)
LogT - generalized Log transform logical (default is TRUE)
RSD - percentage relative standard deviation cutoff for reproducible features assessed from the pooled QC samples (default is 30% RSD).
wd - name of working directory (default="D:\\R_data\\")