R/getS.R

Defines functions getS

Documented in getS

getS <- function(dS,xc,t,jays) {
    if(is.list(dS)) {
        S <- lapply(dS[jays],function(f,x,t){f(x,t)},x=xc,t=t)
    } else {
        S <- lapply(jays,function(j,dS,x,t){dS(x,t,j)},dS=dS,x=xc,t=t)
    }
    matrix(unlist(S),nrow=length(xc),ncol=length(jays))
}

Try the AssetPricing package in your browser

Any scripts or data that you put into this service are public.

AssetPricing documentation built on Oct. 8, 2021, 1:07 a.m.