\name{fcs_to_img}
\encoding{UTF-8}
\alias{fcs_to_img}
\alias{fcs_to_img,character-method}
\docType{methods}
\title{FCS files to images}
\description{Create histogram images of FCS files.}
\usage{\S4method{fcs_to_img}{character}(files,transformation=FALSE,ch1="FS.Log",ch2="FL.4.Log",width=300,height=300,\dots)}
\arguments{
\item{files}{List of all .fcs files. All files have to be in one folder. See the manual for more information about creating the list.}
\item{transformation}{Character string to define the type of data transformation (default=\emph{FALSE}). Fore more details type "?read.FCS" into R command line.}
\item{ch1}{Character string indicating the first channel of the histogram (x-axis) (default=\emph{"FS.Log"}). See the manual for more details.}
\item{ch2}{Character string indicating the second channel of the histogram (y-axis) (default=\emph{"FL.4.Log"}). See the manual for more details.}
\item{width}{Width (pixel) of the resulting histogram image (default=\emph{300}).}
\item{height}{Height (pixel) of the resulting histogram image (default=\emph{300}).}
\item{...}{Additional parameters used for reading the FCS files, for creating the PNG images and for creating the plots. Fore more details type "?read.FCS", "?png" or "??ggplot2" into R command line.}
}
\details{This method creates histogram images of FCS files using the \emph{ggplot} method of the package "ggplot2" (see reference Wickham 2009). After creating a list containing the names of the FCS files a new folder called "chic_images" is created in the working directory  that contains the histogram images. Choose the two channels that are used for plotting on the x/y-axis.}

\value{The \emph{fcs_to_img()} method creates histogram images of FCS files.}

\references{\emph{H. Wickham. ggplot2: elegant graphics for data analysis. Springer New York,2009.}}

\author{Joachim Schumann \email{joachim.schumann@ufz.de}, Christin Koch \email{christin.koch@ufz.de}, Ingo Fetzer \email{info.fetzer@stockholmresilience.su.se}, Susann Müller \email{susann.mueller@ufz.de}}

\examples{
require(flowCore)
require(ggplot2)

## Write the histogram images of the FCS files that are included 
## to the package in a new subfolder of the working directory
## called "chic_images"

# Get a list of the filenames of the FCS files
files <- list.files(system.file("extdata",package="flowCHIC"),
full=TRUE,pattern="*.fcs")
# Create histogram images and save them
fcs_to_img(files)
}


\keyword{fcs}
\keyword{file.show(file.path(R.home("doc"),"KEYWORDS"))}