Skip to content

Commit

Permalink
updates
Browse files Browse the repository at this point in the history
Signed-off-by: systematicinvestor <thesystematicinvestor@gmail.com>
  • Loading branch information
systematicinvestor committed Apr 29, 2016
1 parent cb371d9 commit 38c923d
Show file tree
Hide file tree
Showing 9 changed files with 27 additions and 8 deletions.
2 changes: 1 addition & 1 deletion R/bt.r
Expand Up @@ -287,7 +287,7 @@ bt.prep.remove.symbols <- function
b$weight = b$weight[, -index]
b$execution.price = b$execution.price[, -index]

rm(list = b$symbolnames[index], envir = b)
env.rm(b$symbolnames[index], b)
b$symbolnames = b$symbolnames[ -index]
}
}
Expand Down
13 changes: 11 additions & 2 deletions R/utils.r
Expand Up @@ -214,8 +214,17 @@ env <- function
#' @export
#' @rdname EnvironmentFunctions
###############################################################################
env.del <- function(names, env) {
rm(list=intersect(ls(env), names), envir=env)
env.del = function(names, env) {
warning('env.del is depricated as of Apr 25, 2016 please use env.rm function instead')
env.rm(names, env)
}

#' @export
env.rm = function(names, env) {
missing = setdiff(names, ls(env))
if( len(missing) > 0)
warning('Following names are missing in environment:', missing, '\n, names available in environment:', ls(env))
rm(list=intersect(names, ls(env)), envir=env)
}


Expand Down
Binary file modified SIT.tar.gz
Binary file not shown.
4 changes: 2 additions & 2 deletions pkg/DESCRIPTION
Expand Up @@ -3,8 +3,8 @@ Type: Package
Title: Systematic Investor Toolbox
Description: Systematic Investor Toolbox is a collection of tools that
I use in my investment research.
Version: 2016.04.28
Date: 2016-04-28
Version: 2016.04.29
Date: 2016-04-29
License: GPL-3
LazyLoad: yes
Author: Michael Kapler <TheSystematicInvestor@gmail.com>
Expand Down
1 change: 1 addition & 0 deletions pkg/NAMESPACE
Expand Up @@ -175,6 +175,7 @@ export(empty.group)
export(engineering.returns.kpi)
export(env)
export(env.del)
export(env.rm)
export(equal.risk.contribution.portfolio)
export(equal.weight.portfolio)
export(ev.ratio)
Expand Down
2 changes: 1 addition & 1 deletion pkg/R/bt.r
Expand Up @@ -287,7 +287,7 @@ bt.prep.remove.symbols <- function
b$weight = b$weight[, -index]
b$execution.price = b$execution.price[, -index]

rm(list = b$symbolnames[index], envir = b)
env.rm(b$symbolnames[index], b)
b$symbolnames = b$symbolnames[ -index]
}
}
Expand Down
13 changes: 11 additions & 2 deletions pkg/R/utils.r
Expand Up @@ -214,8 +214,17 @@ env <- function
#' @export
#' @rdname EnvironmentFunctions
###############################################################################
env.del <- function(names, env) {
rm(list=intersect(ls(env), names), envir=env)
env.del = function(names, env) {
warning('env.del is depricated as of Apr 25, 2016 please use env.rm function instead')
env.rm(names, env)
}

#' @export
env.rm = function(names, env) {
missing = setdiff(names, ls(env))
if( len(missing) > 0)
warning('Following names are missing in environment:', missing, '\n, names available in environment:', ls(env))
rm(list=intersect(names, ls(env)), envir=env)
}


Expand Down
Binary file modified sit.gz
Binary file not shown.
Binary file modified sit.lite.gz
Binary file not shown.

0 comments on commit 38c923d

Please sign in to comment.