1

I want to understand the codes behind the package fastSOM that calculate the Diebold-Yilmaz total spillover measure.

My problem is that when I want to open the functions that contain the package appear the command .Call that I understand call a function in C. I do not know how to open the functions that are called with .Call. For example, I want to understand the function normalize_fev so I write > getAnywhere(normalize_fev) and this function use .Call("scaleSigma", Sigma, scaling_factor, N, PACKAGE = "fastSOM"). How I can see what exactly do scaleSigma? If I write getAnywhere(fev) the output says that does not find the function.

 > getAnywhere(normalize_fev)
A single object matching ‘normalize_fev’ was found
It was found in the following places
  namespace:fastSOM
with value

function (Sigma, A, N = dim(Sigma)[1], H = dim(A)[3]) 
{
    scaling_factor <- 1/sqrt(forecast_error_variances(Sigma, 
        A))
    Sigma[] <- .Call("scaleSigma", Sigma, scaling_factor, N, 
        PACKAGE = "fastSOM")
    A[] <- .Call("scaleA", A, scaling_factor, N, H, PACKAGE = "fastSOM")
    list(Sigma = Sigma, A = A)
}

> getAnywhere(fev)
no object named ‘fev’ was found
Cœur
  • 37,241
  • 25
  • 195
  • 267

0 Answers0