https://github.com/cran/flexmix
Tip revision: c81639b9efbc365dff7f4e9cf6d6f5ff01210771 authored by Friedrich Leisch on 07 September 2007, 00:00:00 UTC
version 2.0-1
version 2.0-1
Tip revision: c81639b
utils.R
#
# Copyright (C) 2004-2005 Friedrich Leisch
# $Id: utils.R 1838 2005-09-29 19:23:09Z leisch $
#
list2object = function(from, to){
n = names(from)
s = slotNames(to)
p = pmatch(n, s)
if(any(is.na(p)))
stop(paste("\nInvalid slot name(s) for class",
to, ":", paste(n[is.na(p)], collapse=" ")))
names(from) = s[p]
do.call("new", c(from, Class=to))
}
printIter = function(iter, logLik, label="Log-likelihood")
cat(formatC(iter, width=4),
label, ":", formatC(logLik, width=12, format="f"),"\n")
## library(colorspace)
## dput(x[c(1,3,5,7,2,4,6,8)])
## x = hcl(seq(0, 360*7/8, length = 8), c=30)
LightColors <- c("#F9C3CD", "#D0D4A8", "#9DDDD5", "#D1CCF5",
"#EDCAB2", "#AFDCB8", "#ACD7ED", "#EFC4E8")
## x = hcl(seq(0, 360*7/8, length = 8), c=100, l=65)
FullColors <- c("#FF648A", "#96A100", "#00BCA3", "#9885FF",
"#DC8400", "#00B430", "#00AEEF", "#F45BE1")