SCM Repository

[twsinstrument] View of /pkg/qmao/R/
ViewVC logotype

View of /pkg/qmao/R/

Parent Directory Parent Directory | Revision Log Revision Log

Revision 291 - (download) (annotate)
Mon Jun 25 15:19:30 2012 UTC (5 years, 11 months ago) by gsee
File size: 964 byte(s)
Move some functions from (private) package:gsee
 - getHoldings.vaneck (get holdings of Van Eck ETFs; e.g. GLD, OIH)
 - getHoldings.powershares (getHoldings of PowerShares (e.g. QQQ)
 - getSymbols.pos (a getSymbols method to get data from an environment; not terribly useful, and not exported)
 - MakeStrictlyRegular (missing data? na.locf until you have the right number of rows for each day)
 - ExcludeTimes (remove a timespan from multiple days of data)
 - ExcludeDates (remove one or more days worth of data)
 - (faster, less memory intensive way to, *))
#' Faster way to \code{, lst)}
#' This is a functionalized version of Dominik's answer here: 
#' \url{}
#' it does what, lst) would do, but faster and with less memory usage
#' @param lst a list to be rbound. (No guaranteed this funtion will offer an improvement unless
#' \code{lst} is a lits of xts objects)
#' @references \url{}
#' @examples
#' x <- xts(rnorm(10000), Sys.time()-10000:1*60)
#' splx <- split(x, 'days')
#' dcrx <-
#' identical(x, dcrx)
#' @export <- function(lst) {
    while(length(lst) > 1) {
        idxlst <- seq(from=1, to=length(lst), by=2)

        lst <- lapply(idxlst, function(i) {
            if(i==length(lst)) { return(lst[[i]]) }

            return(rbind(lst[[i]], lst[[i+1]]))
ViewVC Help
Powered by ViewVC 1.0.0  
Thanks to:
Vienna University of Economics and Business University of Wisconsin - Madison Powered By FusionForge