When an R function is typed without ()
, the code that makes up the function will be returned
e.g.
head
function (x, ...)
UseMethod("head")
<bytecode: 0x0000022cd79ce9a8>
<environment: namespace:utils>
How can I do this for a function that is calling some C code?
Example
I am trying to see the (c) code that makes up the _pdftools_poppler_pdf_text
function from pdftools
package (which can be found by running pdftools:::poppler_pdf_text
, which itself comes from the exported function pdf_text
)
i.e.
pdftools:::poppler_pdf_text
Returns
function (x, opw, upw)
{
.Call("_pdftools_poppler_pdf_text", PACKAGE = "pdftools",
x, opw, upw)
}
<bytecode: 0x0000022ce8bff450>
<environment: namespace:pdftools>
How can I see the (c) code that makes up _pdftools_poppler_pdf_text
?