search for: goodfunction

Displaying 2 results from an estimated 2 matches for "goodfunction".

Did you mean: foofunction
2007 Jun 15
2
model.frame: how does one use it?
...A simple contrived example is ----------------------------------------------------------------------------- library(rpart) ## using data from help(rpart), set up simple example myformula <- formula(Kyphosis ~ Age + Number + Start) mydata <- kyphosis myweight <- abs(rnorm(nrow(mydata))) goodFunction <- function(mydata, myformula, myweight) { hyp <- rpart(myformula, data=mydata, weights=myweight, method="class") prev <- hyp } goodFunction(mydata, myformula, myweight) cat("Ok\n") ## now remove myweight and try to compute it inside a function rm(myweight) badFun...
2018 Feb 21
1
Checking for a proper "stop" statement...
Folks: Consider the following two use cases: goodfunction <- function() { stop("Something went wrong..." } # vs. badfunction <- function() { notgood() } Is there a way for me to test if the functions make use of a stop() statement WITHOUT modifying the stop() output (assume I can't mod the function containing the stop() statement it...