Description Usage Arguments Details Value Author(s) See Also Examples

Extract a subset of a `DGEList`

, `DGEGLM`

, `DGEExact`

or `DGELRT`

object.

1 2 3 4 5 6 7 8 9 10 | ```
## S3 method for class 'DGEList'
object[i, j, keep.lib.sizes=TRUE]
## S3 method for class 'DGEGLM'
object[i, j]
## S3 method for class 'DGEExact'
object[i, j]
## S3 method for class 'DGELRT'
object[i, j]
## S3 method for class 'TopTags'
object[i, j]
``` |

`object` |
object of class |

`i,j` |
elements to extract. |

`keep.lib.sizes` |
logical, if |

`i,j`

may take any values acceptable for the matrix components of `object`

of class `DGEList`

.
See the Extract help entry for more details on subsetting matrices. For `DGEGLM`

, `DGEExact`

and `DGELRT`

objects, only rows (i.e. `i`

) may be subsetted.

An object of the same class as `object`

holding data from the specified subset of rows and columns.

Davis McCarthy, Gordon Smyth

`Extract`

in the base package.

1 2 3 4 5 6 7 8 9 10 11 | ```
d <- matrix(rnbinom(16,size=1,mu=10),4,4)
rownames(d) <- c("a","b","c","d")
colnames(d) <- c("A1","A2","B1","B2")
d <- DGEList(counts=d,group=factor(c("A","A","B","B")))
d[1:2,]
d[1:2,2]
d[,2]
d <- estimateCommonDisp(d)
results <- exactTest(d)
results[1:2,]
# NB: cannot subset columns for DGEExact objects
``` |

```
Loading required package: limma
An object of class "DGEList"
$counts
A1 A2 B1 B2
a 66 1 11 0
b 4 1 43 8
$samples
group lib.size norm.factors
A1 A 138 1
A2 A 11 1
B1 B 64 1
B2 B 9 1
An object of class "DGEList"
$counts
A2
a 1
b 1
$samples
group lib.size norm.factors
A2 A 11 1
An object of class "DGEList"
$counts
A2
a 1
b 1
c 9
d 0
$samples
group lib.size norm.factors
A2 A 11 1
An object of class "DGEExact"
$table
logFC logCPM PValue
a -1.406454 17.94948 0.150924386
b 4.214324 18.60396 0.002036875
$comparison
[1] "A" "B"
```

Embedding an R snippet on your website

Add the following code to your website.

For more information on customizing the embed code, read Embedding Snippets.