-3

I would like to understand how really works this script :

y <- y[keep, , keep.lib.sizes=FALSE]

in : keep <- rowSums(cpm(y)>1) >= 3 y <- y[keep, , keep.lib.sizes=FALSE]

I do know d.f[a,b] but I can not find R-doc for d.f[a, ,b].

I tried "brackets", "hooks", "commas"... :-(

(Sometimes I would prefer that one does not simplifie his R script !)

Thanks in advance.

Zampaï
  • 11
  • 6
  • 3
    you need to read the documentation of the specific package. It seems to come from `edgeR` (see https://www.bioconductor.org/packages/devel/bioc/vignettes/edgeR/inst/doc/edgeRUsersGuide.pdf). Yes, google is your friend (I found the ref in ~30 seconds, with "keep.lib.sizes" as keyword...) – Cath Jul 04 '16 at 14:43
  • I already spent thousands of hours in this official 104 p book. In this book it is assumed that we are "R" masters ! But I am not. And I like to understand what I am doing. This is why I was looking for help here. Save me from this kind of comment please. – Zampaï Jul 04 '16 at 19:43

1 Answers1

0

Subscripting data.Frames takes two values: df[rows, columns]. Any third value are optional arguments that you can use to subscript.

The most common of those is drop=FALSE as in df[1:18, 3, drop = FALSE]. This is done because when you subset just one column of a data.frame, it will lose the data.frame class. In your specific case, it seems like you are using another object that looks like a data.frame but with added functionalities from the bioconductor package. A look at the methods for those will tell you how these work.

Choubi
  • 640
  • 3
  • 9