Exploratory model analysis with R and GGobi [PDF]: "Firstly, the t scores for infant mortality are very similar over all models. This indicates that this variable is largely independent of the other explanatory variables." (What's a real world situation if any where you might expect this to be misleading?) Selecting Amongst Large Classes of Models [PDF]. (Makes me think of the cross validation article.)
Please don't delete your old stuff. An Executable Semantics For C Is Useful. c-semantics. Ask HN: Do Americans stand a chance on freelance sites?. (People say "yes".) Xavier Leroy.
Integration by integration under the integral sign. Integration by differentiation of parameter. (I finally encountered the latter in a grad school stat class.)
Reading Code From Top to Bottom by Tom Duff. (HN) (Avoid deep nesting for better readability.) Shareware Amateurs vs. Shareware Professionals.
esoteric R: introducing closures. Does function itself not create a closure?
Please don't delete your old stuff. An Executable Semantics For C Is Useful. c-semantics. Ask HN: Do Americans stand a chance on freelance sites?. (People say "yes".) Xavier Leroy.
Integration by integration under the integral sign. Integration by differentiation of parameter. (I finally encountered the latter in a grad school stat class.)
Reading Code From Top to Bottom by Tom Duff. (HN) (Avoid deep nesting for better readability.) Shareware Amateurs vs. Shareware Professionals.
esoteric R: introducing closures. Does function itself not create a closure?
f <- (function() {
x <- 3
return(function(y) x * y)
})()
> do.call(f, list(y=1:10))
[1] 3 6 9 12 15 18 21 24 27 30Seems we can abstract out an "addMethod" function:addMethod <- function(env, name, func) {
# Since env is assumed to be an environment,
# would it add anything to instead assign
# as.environment(env)?
environment(func) <- env
env[[name]] <- func
}
queue <- function() {
e <- new.env(hash=TRUE)
e$.queue <- NULL
addMethod(e, "push", function(x) {
.queue <<- c(.queue, x)
return(invisible(x))
})
addMethod(e, "pop", function() {
val <- .queue[1]
.queue <<- .queue[-1]
return(val)
})
return(e)
}(One problem with this: every queue instance gets its own copies of the functions.)