knitr::opts_chunk$set( collapse = TRUE, comment = "#>", fig.path = "man/figures/README-", out.width = "100%" )
The cms package uses tabular data from rat epilepsy studies and applies a composite measures scheme (via PCA) to select the most prominent features. Further, variables can be selected to perform cluster analysis on a subset in order to build a composite score. Finally, the cluster distribution is displayed for the subgroups and allows severity assessment between animal models.
Please note: the cms_analysis and cms_cluster functions are deprecated.
Click here for reading the cms Vignette.
The cms package has some dependencies. We advise installing/updating the following packages before using cms:
You can install the development version from GitHub with:
# install.packages("devtools") devtools::install_github("mytalbot/cms") library(cms)
The following example uses the (pre-cleaned) internalized epilepsy data
(episet_full) set with three experimental subgroups. Further, the feature
selection is repeated 100-fold. The example uses the new cms
function. Please
note that all variables that shall be included must be specified in the vars
object.
library(knitr) library(kableExtra)
Note: the following example shows the pooled data from the episet_full set, using the pooled subgroups. You might need to filter them, if you are interested in specific subsets.
library(cms) # Do the cms feature analysis (with a limited set of variables) usecase <- cms(raw = episet_full, runs = 100, idvariable = "animal_id", setsize = 0.8, variables = c("Sacc_pref", "social_interaction", "burrowing_rat", "openfield_rat"), maxPC = 1:4, clusters = 3, showplot = FALSE) # This also shows the plot usecase$p
head(usecase$FRQ)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.