[R] Looking up the code for a function

Viechtbauer Wolfgang (STAT) wolfgang.viechtbauer at maastrichtuniversity.nl
Wed May 6 17:11:30 CEST 2015


Probably these are non-exported functions. Try:

getAnywhere(<function name>)

Or if you know which package a function comes from:

<package name>:::<function name>

Best,
Wolfgang

--    
Wolfgang Viechtbauer, Ph.D., Statistician    
Department of Psychiatry and Neuropsychology    
School for Mental Health and Neuroscience    
Faculty of Health, Medicine, and Life Sciences    
Maastricht University, P.O. Box 616 (VIJV1)    
6200 MD Maastricht, The Netherlands    
+31 (43) 388-4170 | http://www.wvbauer.com    

> -----Original Message-----
> From: R-help [mailto:r-help-bounces at r-project.org] On Behalf Of Ronald
> Kölpin
> Sent: Wednesday, May 06, 2015 17:00
> To: r-help at r-project.org
> Subject: [R] Looking up the code for a function
> 
> Hi all,
> 
> I am trying to find out how a certain functionality is implemented in R
> respectively what a certain found does exactly.
> 
> Specifically I am interested in multivariate kernel density estimation.
> I found the "ks" package and its "kde" function. Usually, my preferred
> way to "look under the hood" of any function is to simply type the
> functions name without any brackets or arguments, in this case just:
> kde. And this works fine for kde itself. But kde calls other functions,
> such as kde.grid.3d or kde.points and typing those function names just
> yields "Error: Object '[function name]' not found". These functions
> aren't defined within kde either (as far as I can see).
> 
> So here is my question: Am I doing something wrong? Is there a way to
> look up the code of these functions?
> 
> (I already tried google but found only the usual documentation
> (vignettes) and articles referencing the function kde or the package ks).
> 
> Thanks a lot in advance
> and kind regards
> 
> RK
> 
> ______________________________________________
> R-help at r-project.org mailing list -- To UNSUBSCRIBE and more, see
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide http://www.R-project.org/posting-
> guide.html
> and provide commented, minimal, self-contained, reproducible code.



More information about the R-help mailing list