impute | R Documentation |
Impute NA values
impute(object, ...)
## S3 method for class 'numeric'
impute(object, shift = 2.5, width = 0.3, verbose = TRUE, plot = FALSE, ...)
## S3 method for class 'matrix'
impute(
object,
shift = 2.5,
width = 0.3,
verbose = TRUE,
plot = FALSE,
n = min(9, ncol(object)),
palette = make_colors(colnames(object)),
...
)
## S3 method for class 'SummarizedExperiment'
impute(
object,
assay = assayNames(object)[1],
by = "subgroup",
shift = 2.5,
width = 0.3,
frac = 0.5,
verbose = TRUE,
plot = FALSE,
palette = make_colors(colnames(object)),
n = min(9, ncol(object)),
...
)
object |
numeric vector, SumExp |
... |
required for s3 dispatch |
shift |
number: sd units |
width |
number: sd units |
verbose |
TRUE or FALSE |
plot |
TRUE or FALSE |
n |
number of samples to plot |
palette |
color vector |
assay |
string |
by |
svar |
frac |
fraction: fraction of available samples should be greater than this value for a subgroup to be called available |
Imputes NA values from N(mean - 2.5 sd, 0.3 sd)
numeric vector, matrix or SumExp
# Simple Design
file <- system.file('extdata/fukuda20.proteingroups.txt', package = 'autonomics')
object <- read_maxquant_proteingroups(file)
impute(values(object)[, 1], plot = TRUE)[1:3] # vector
impute(values(object), plot = TRUE)[1:3, 1:3] # matrix
impute(object, plot = TRUE) # sumexp
# Complex Design
subgroups <- sprintf('%s_STD', c('E00','E01','E02','E05','E15','E30','M00'))
file <- system.file('extdata/billing19.proteingroups.txt', package = 'autonomics')
object <- read_maxquant_proteingroups(file, subgroups = subgroups)
impute(values(object)[1:3, 1 ]) # vector
impute(values(object)[1:3, 1:5 ]) # matrix
impute( object ) # sumexp
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.