search for: mixfit

Displaying 1 result from an estimated 1 matches for "mixfit".

Did you mean: misfit
2023 May 25
4
environments: functions within functions
...of environment() within eval() means that the objects passed to the wrapper function are no longer visible within the eval() call. I have a two-part question: A. How do I get around this right now? B. What would the correct approach be for the package authors? library(mixR) # first example from ?mixfit ## fitting the normal mixture models set.seed(103) x <- rmixnormal(200, c(0.3, 0.7), c(2, 5), c(1, 1)) data <- bin(x, seq(-1, 8, 0.25)) fit1 <- mixfit(x, ncomp = 2) # raw data rm(x, data) ### # simple function funworks <- function(x) { print(x) } ### # almost identical simple fu...