Just another update

This commit is contained in:
Ingy döt Net 2015-02-20 00:35:01 -05:00
parent a25938f123
commit 00a190b0a6
6591 changed files with 94363 additions and 23227 deletions

View file

@ -0,0 +1,20 @@
compare <- function(a, b)
{
cat(paste(a, "is of type", class(a), "and", b, "is of type", class(b), "\n"))
printer <- function(a, b, msg) cat(paste(a, msg, b, "\n"))
op <- c(`<`, `<=`, `>`, `>=`, `==`, `!=`)
msgs <- c(
"is strictly less than",
"is less than or equal to",
"is strictly greater than",
"is greater than or equal to",
"is equal to",
"is not equal to"
)
sapply(1:length(msgs), function(i) if(op[[i]](a, b)) printer(a, b, msgs[i]))
invisible()
}