The number of missing data on each exposure and on each phenotype can be found by using the function ds.tableMissings
. This function returns a vector with the amount of missing data in each exposure or phenotype. The argument set
indicates if the number of missing values is counted on exposures or phenotypes. The argument output
indicates if it is shown as counts (output="n"
) or as percentage (output="p"
).
expos <- ds.tableMissings("exposome_object", set = "exposures") phenos <- ds.tableMissings("exposome_object", set = "phenotypes")
Optionally, there's also the ds.plotMissings
function which returns a ggplot
object with a barplot of missings for exposures or phenotypes, there's the option of displaying the percentage of missings as well as total counts, check the function documentation for further information.
ds.plotMissings(expos) ds.plotMissings(phenos)
Please note that since this function call returns a ggplot
object, it can be plotted properly to avoid squished Y axis when there are lots of exposures, read the official documentation for information on how to do that.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.