convertS3toS4 {rflowcyt} | R Documentation

## Converts S3 class FCS object to S4 class FCS object

### Description

This function will update any S3 class `FCS` object to S4 class.

### Usage

    convertS3toS4(S3file, myFCSobj.name = "", fileName = "")

### Arguments

`S3file` | S3 Class FCS object location and filename
`myFCSobj.name` | character string indicating the FCS object name
`fileName` | character string indicating the file name of the binary raw FCS data, from which the FCS object originates and which is read by `read.FCS`

### Details

The FCS object is obtained as the result of `read.FCS` which has been currently updated to output FCS objects as class S4 instead of S3.

### Value

A Class S4 `FCS` object with the following slots:

`data` | matrix of the data, where the rows are the cells/observations and the columns are the different fluoroescence measurements
`metadata` | of class `FCSmetadata` with the following slots: mode the mode of the raw binary file size numeric value describing the total number of rows or observations/cells nparam numeric value describing the number of columns or parameters shortnames a vector of the short names of the column variables of the data longnames a vector of the long names of the column variables of the data paramranges the vector of corresponding ranges or maximum values for each column variable filename character string of the name of the raw data file from which the object originates objectname character string of the name of the FCS S4 object original Boolean value indicating whether the data is the original fcsinfo list of other parameters

### Author(s)

A.J. Rossini and J.Y. Wan

### See Also

`read.FCS`, `FCS`

### Examples

      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)
      }

[Package rflowcyt version 1.4.0 Index]