Nothing
#' @describeIn ExposomeSet Returns a vector with the number of missing values
#' per exposure.
setMethod(
f = "tableMissings",
signature = "ExposomeSet",
definition = function(object, set = c("exposures", "phenotypes"),
output = "n", sort = TRUE) {
if(set == "exposures") {
dta <- t(assayDataElement(object, "exp"))
} else if(set == "phenotypes") {
dta <- pData(object)
} else {
stop("Invalid 'set' selected.")
}
if(output == "n") {
x <- apply(dta, MARGIN=2, function(colm) sum(is.na(colm)))
} else if(output == "p") {
x <- apply(dta, MARGIN=2, function(colm) sum(is.na(colm)) * 1.0 / length(colm))
} else {
stop("Invalid 'output' type.")
}
if(sort) {
x <- x[order(x)]
}
return(x)
}
)
Any scripts or data that you put into this service are public.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.