Skip to content

Commit

Permalink
-|-
Browse files Browse the repository at this point in the history
  • Loading branch information
Yiran Sheng committed Apr 23, 2012
1 parent b4f0147 commit 072c50c
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions utils.r
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ utils[["%||%"]] <- function(e1, e2, except=c(NA,F)) {
### Miscs
################################################

cache <- function(variable) {
utils$cache <- function(variable) {
if ( !("./cache" %in% list.dirs()) ) {
dir.create("cache")
}
Expand All @@ -56,7 +56,7 @@ cache <- function(variable) {
file = file.path('cache',
paste(variable, '.RData', sep = '')))
}
cache.get <- function(variable) {
utils$cache.get <- function(variable) {
filename = file.path('cache',
paste(variable, '.RData', sep = ''))
load(filename, envir = .GlobalEnv)
Expand Down

0 comments on commit 072c50c

Please sign in to comment.