# The color scale used:
# cscale <- c(rev(rainbow(4, start = 0.45, end = 0.66)), rev(rainbow(5, start = 0.0, end = 0.25)))
# pie(rep(1, 9), col = cscale)
#
# This data set is a mixture of compounds, some of
# which have correlated concentrations, both
# positively and negatively. The contour plot shows
# correlations w/i a spin system and among compounds.
# The 2nd plot shows one particular frequency.
# For more info about the data set see ?MUD
#
data(metMUD2)
lvs <- c(-0.99, -0.95, -0.9, 0.9, 0.95, 0.99)
lim <- c(0.6, 4.3)
res <- corSpectra(metMUD2, levels = lvs, limX = lim, limY = lim, main = "metMUD2 STOCSY Analysis")
jnk <- covSpectra(metMUD2, freq = 1.030, C = res[[2]], V = res[[1]])
require("jsonlite")
require("js")
jnk <- covSpectraJS(metMUD2, freq = 1.030, C = res[[2]], V = res[[1]])
# Code to sort the frequency axis
# Run prior to pre-computing the cor/cov matrices
if (is.unsorted(Spectra_object$freq)) {
Spectra_object$freq <- rev(Spectra_object$freq)
Spectra_object <- Spectra_object[,ncol(Spectra_object$data):1]
}Run the code above in your browser using DataLab