I was studying some functions of the package rimage. If you want to see, for example, the code for the sobel.h function, you obtain:

> library(rimage)
> sobel.h
function (img) 
{
    w <- dim(img)[2]
    h <- dim(img)[1]
    imagematrix(abs(matrix(.C("sobel_h", as.double(img), as.integer(w), 
        as.integer(h), eimg = double(w * h), PACKAGE = "rimage")$eimg, 
        nrow = h, ncol = w)), noclipping = TRUE)
}

So the sobel.h function uses the C routine called sobel_h, (which is (I think) stored in the file rimage.dll).

Is there any way to see the C code of the sobel_h function?

(I speak about the package rimage for a practical example; but the answer would of course generalised to all packages that uses .C routines).

r
Edit
Report