knitr::opts_chunk$set(echo = TRUE)
library("knitr") library(kableExtra) opts_chunk$set(tidy=FALSE,tidy.opts=list(width.cutoff=30),dev="png", fig.width=7,fig.height=7, message=FALSE, warning = FALSE)
You can install the R package Robocov from Github.
install.packages("CVXR") install_github('kkdey/Robocov')
Next load the package into R.
library(Robocov)
library(corrplot)
We load an example data matrix X.
data("sample_by_feature_data") dim(sample_by_feature_data) ## dimension of data matrix length(which(is.na(sample_by_feature_data)))/length(sample_by_feature_data) ## proportion of missing data
standard = cor(sample_by_feature_data, use = "pairwise.complete.obs") corrplot::corrplot(standard, diag = TRUE, col = colorRampPalette(c("lightblue4", "lightblue2", "white", "indianred1", "indianred3"))(200), tl.pos = "ld", tl.cex = 0.5, tl.col = "black", rect.col = "white",na.label.col = "white", method = "color", type = "lower", tl.srt=45)
robocov = Robocov_cor(sample_by_feature_data) corrplot::corrplot(robocov, diag = TRUE, col = colorRampPalette(c("lightblue4", "lightblue2", "white", "indianred1", "indianred3"))(200), tl.pos = "ld", tl.cex = 0.5, tl.col = "black", rect.col = "white",na.label.col = "white", method = "color", type = "lower", tl.srt=45)
probocov = Robocov_precision(sample_by_feature_data, alpha = 0.1) corrplot::corrplot(probocov, diag = TRUE, col = colorRampPalette(c("lightblue4", "lightblue2", "white", "indianred1", "indianred3"))(200), tl.pos = "ld", tl.cex = 0.5, tl.col = "black", rect.col = "white",na.label.col = "white", method = "color", type = "lower", tl.srt=45)
sessionInfo()
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.