Skip to content

Instantly share code, notes, and snippets.

@wrathematics
Created November 13, 2014 16:27
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save wrathematics/8a37b7b5b011e69ec88c to your computer and use it in GitHub Desktop.
Save wrathematics/8a37b7b5b011e69ec88c to your computer and use it in GitHub Desktop.
print methods
setMethod("print", signature(x="logical"),
function(x)
{
if (is.na(x))
base::print("who knows?")
else if (x)
base::print("to be sure")
else
base::print("nope")
}
)
print(NA)
print(TRUE)
print(FALSE)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment