Browse files

-|-

  • Loading branch information...
1 parent 072c50c commit e138d49b8fde8899f79026cfbee59f70bd6cc24e @yiransheng committed Apr 23, 2012
Showing with 7 additions and 0 deletions.
  1. +7 −0 utils.r
View
7 utils.r
@@ -21,6 +21,12 @@ utils$as.d <- as.data.frame
utils$as.t <- as.table
utils$is.nna <- function (x) !is.na(x)
+utils$doc <- function(package) {
+ .text <- deparse(substitute(package))
+ do.call(library, list(help=.text))
+}
+
+
################################################
### Custom "or" / "||" operator,
### capable of checking if a variable is defined
@@ -115,6 +121,7 @@ utils$cleanse <- function(...){
utils$clean.matrix(x)
}
+
if ("utils" %in% search()) detach("utils")
attach(utils)

0 comments on commit e138d49

Please sign in to comment.