ncfsApply,ncdfFlowSet-method {ncdfFlow} | R Documentation

## apply method for ncdfFlowSet (for internal use)

### Description

It is equivalent to `fsApply`. But the latter could cause memory issue when `FUN` returns a `flowFrame`. `ncfsApply` writes to a new cdf file instead of memory. Thus it will return a ncdfFlowSet object.

### Usage

    ## S4 method for signature 'ncdfFlowSet'
    ncfsApply(x, FUN, ..., use.exprs = FALSE, ncdfFile = NULL)

### Arguments

`x` | `ncdfFlowSet`
`FUN` | `function` to apply
`...` | other arguments to pass to `FUN`
`use.exprs` | `logical` see `fsApply`
`ncdfFile` | A character scalar giving the output file name. By default, It is NULL and the function will generate a random file name, potentially adding the `.cdf` suffix unless a file extension is already present.

### Details

When the function given by argument "FUN" does not return the entire flowFrame object with the same size of the original one (such as compensate,transform...), `fsApply` should be used instead.

### Examples

    data(GvHD)
    nc <- ncdfFlowSet(GvHD[1:2])

    #use fsApply when FUN does not return a flowFrame
    fsApply(nc, nrow)
    fsApply(nc, range)

    #use ncfsApply when FUN returns a flowFrame
    lgcl <- logicleTransform( w = 0.5, t= 10000, m =4.5)
    translist <- transformList(c("FL1-H", "FL2-H"), lgcl)
    nc1 <- ncfsApply(nc, transform, translist)

[Package ncdfFlow version 2.33.2 Index]