R: 'getIndices' extracts the event indices of one or multiple...
getIndices,ncdfFlowSet,character-method
R Documentation
getIndices extracts the event indices of one or multiple samples from ncdfFlowSet
Description
These functions are mainly for internal usage and normally not to be used by users.
initIndices initializes the event indices for the entire ncdfFlowSet with NA
updateIndices updates the event indices of the target sample in ncdfFlowSet
Usage
## S4 method for signature 'ncdfFlowSet,character'
getIndices(obj, y)
## S4 method for signature 'ncdfFlowSet'
initIndices(obj)
## S4 method for signature 'ncdfFlowSet,character,logical'
updateIndices(obj, y, z)
Arguments
obj
ncdfFlowSet object
y
character sample name
z
logical vector to be assigned.
Value
a logical vector.
Examples
data(GvHD)
nc <- ncdfFlowSet(GvHD[1:2])
sn <- sampleNames(nc)[1]
nrow(nc[[sn]])
getIndices(nc, sn) #initial index is NA
#subset with filter
morphGate <- norm2Filter("FSC-H", "SSC-H", filterId = "MorphologyGate",scale = 2)
nc1 <- Subset(nc, morphGate)
ind <- getIndices(nc1, sn)
all.equal(sum(ind), nrow(nc1[[sn]]))
initIndices(nc1)
getIndices(nc1, sn) #reset indices
Results
R version 3.3.1 (2016-06-21) -- "Bug in Your Hair"
Copyright (C) 2016 The R Foundation for Statistical Computing
Platform: x86_64-pc-linux-gnu (64-bit)
R is free software and comes with ABSOLUTELY NO WARRANTY.
You are welcome to redistribute it under certain conditions.
Type 'license()' or 'licence()' for distribution details.
R is a collaborative project with many contributors.
Type 'contributors()' for more information and
'citation()' on how to cite R or R packages in publications.
Type 'demo()' for some demos, 'help()' for on-line help, or
'help.start()' for an HTML browser interface to help.
Type 'q()' to quit R.
> library(ncdfFlow)
Loading required package: flowCore
Loading required package: flowViz
Loading required package: lattice
Loading required package: RcppArmadillo
Loading required package: BH
> png(filename="/home/ddbj/snapshot/RGM3/R_BC/result/ncdfFlow/Indices.Rd_%03d_medium.png", width=480, height=480)
> ### Name: getIndices,ncdfFlowSet,character-method
> ### Title: 'getIndices' extracts the event indices of one or multiple
> ### samples from ncdfFlowSet
> ### Aliases: getIndices getIndices,ncdfFlowSet,character-method initIndices
> ### initIndices,ncdfFlowSet-method updateIndices
> ### updateIndices,ncdfFlowSet,character,logical-method
>
> ### ** Examples
>
> data(GvHD)
> nc <- ncdfFlowSet(GvHD[1:2])
write s5a01 to empty cdf slot...
write s5a02 to empty cdf slot...
> sn <- sampleNames(nc)[1]
> nrow(nc[[sn]])
[1] 3420
> getIndices(nc, sn) #initial index is NA
[1] NA
> #subset with filter
> morphGate <- norm2Filter("FSC-H", "SSC-H", filterId = "MorphologyGate",scale = 2)
> nc1 <- Subset(nc, morphGate)
> ind <- getIndices(nc1, sn)
> all.equal(sum(ind), nrow(nc1[[sn]]))
[1] TRUE
> initIndices(nc1)
> getIndices(nc1, sn) #reset indices
[1] NA
>
>
>
>
>
> dev.off()
null device
1
>