subset_hetset: Subset 'hetset' Object

Description Usage Arguments Note Author(s) Examples

Description

Select or remove samples or features from hetset object.

Usage

1
2
subset_hetset(H, prt = NULL, keep.samples = NULL, remove.samples = NULL,
              keep.features = NULL, remove.features = NULL)

Arguments

H

hetset object

prt

select subpopulation "A" or "B" (default: NULL)

keep.samples

logical vector of size ncol(H) indicating, which samples to keep

remove.samples

logical vector of lentgth ncol(H) indicating samples to be removed

keep.features

list of features to keep (or logical vector of length nrow(H))

remove.features

list of features to be removed (or logical vector of length nrow(H))

Note

Applies subset function for SummarizedExperiment-class

Author(s)

Daniel

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
X1 <- c(rnorm(50,0,1),rnorm(50,3,1))
X2 <- c(rnorm(50,0,1),rnorm(50,2,1))
X3 <- c(rnorm(50,0,1),rnorm(50,2,2))
X4 <- c(rnorm(50,0,1),rnorm(50,1,1))
X5 <- c(rnorm(50,0,1),rnorm(50,1,2))
A <- matrix(data = rnorm(n = 1000,mean = 0,sd = 1),ncol = 100)
Hds <- hetset(D = rbind(X1,X2,X3,X4,X5,A))
rm(A,X1,X2,X3,X4,X5)
Hds <- scan_hetset(H = Hds,level = "univariate",min_size = 3,
                   max_size = 4,rel_imp = 0,em_steps = 5)

Hds_B <- subset_hetset(Hds,prt = "B")
Hds_X1_5  <- subset_hetset(Hds,remove.samples = (rnorm(ncol(Hds)) < 0),
                           keep.features = Hds@metadata$slf)

ZytoHMGU/hetset documentation built on June 6, 2019, 2:16 p.m.