\HeaderA{convertS3toS4}{Converts S3 class FCS object to S4 class FCS object}{convertS3toS4}
\keyword{classes}{convertS3toS4}
\keyword{character}{convertS3toS4}
\begin{Description}\relax
This function will update any S3 class \code{FCS} object to S4 class.
\end{Description}
\begin{Usage}
\begin{verbatim}
convertS3toS4(S3file, myFCSobj.name = "", fileName = "")
\end{verbatim}
\end{Usage}
\begin{Arguments}
\begin{ldescription}
\item[\code{S3file}] S3 Class FCS object location and filename
\item[\code{myFCSobj.name}] character string indicating the FCS object name 
\item[\code{fileName}] character string indicating the file name of the
binary raw FCS data, from which the
FCS object originates and which is read by \code{read.FCS}
\end{ldescription}
\end{Arguments}
\begin{Details}\relax
The FCS object is obtained as the result of \code{read.FCS} which has
been currently updated to output FCS objects as class S4 instead of S3.
\end{Details}
\begin{Value}
A Class S4 \code{FCS} object with the following slots:
\begin{ldescription}
\item[\code{data}] matrix of the data, where the rows are the
cells/observations and the columns are the different fluoroescence
measurements
\item[\code{metadata}] of class \code{\LinkA{FCSmetadata}{FCSmetadata}} with the following slots:

\item[mode] the mode of the raw binary file

\item[size] numeric value describing the total number of rows or
observations/cells

\item[nparam] numeric value describing the number of columns or
parameters

\item[shortnames] a vector of the short names of the column variables of the data

\item[longnames] a vector of the long names of the column variables of the data

\item[paramranges] the vector of corresponding ranges or maximum
values for each column variable

\item[filename] character string of the name of the raw data file from which the object originates

\item[objectname] character string of the name of the FCS S4 object

\item[original] Boolean value indicating whether the data is the original

\item[fcsinfo] list of other parameters

\end{ldescription}
\end{Value}
\begin{Author}\relax
A.J. Rossini and J.Y. Wan
\end{Author}
\begin{SeeAlso}\relax
\code{\LinkA{read.FCS}{read.FCS}}, \code{\LinkA{FCS}{FCS}}
\end{SeeAlso}
\begin{Examples}
\begin{ExampleCode}
  if (require(rfcdmin)){

     ## if previously read-in as S3 FCS object
     facscan256.fcs<- paste(system.file("fcs", package="rfcdmin"),
                              "facscan256.fcs",
                              sep="/")

     ## reading in the FCS files
     FCSobj.S3<-read.FCS(facscan256.fcs, UseS3=TRUE)

     ## convert to S4 FCS

     FCSobj.S4<- convertS3toS4(FCSobj.S3,
                               myFCSobj.name="FCSobj.S4",
                               fileName=facscan256.fcs)
  }
\end{ExampleCode}
\end{Examples}

