Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

R: Primitive Function - For Historical or Efficiency Reasons?

Tags:

r

How would I find list of primitive functions in R meant for historical or efficiency reasons?

Primitive functions are the ones that provide links between R code and the C code used to write R.

like image 364
Sathish Avatar asked Jan 26 '26 12:01

Sathish


1 Answers

This will get you the names of all R functions that wrap calls to .Primitive():

nms <- names(methods:::.BasicFunsList)        ## ?.BasicFunsList for more info

length(nms)
# [1] 192
c(head(nms, 8), tail(nms, 8))
#  [1] "$"          "$<-"        "["          "[<-"       
#  [5] "[["         "[[<-"       "%*%"        "xtfrm"     
#  [9] "switch"     "tracemem"   "unclass"    "untracemem"
# [13] "while"      "{"          "||"         "~"      
like image 59
Josh O'Brien Avatar answered Jan 28 '26 02:01

Josh O'Brien



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!